The polarization of $\Lambda$ hyperons provides a sensitive probe of how spin degrees of freedom respond to the space-time evolution and anisotropic expansion of matter created in relativistic heavy-ion collisions. We study hyperon polarization within relativistic spin hydrodynamics in the small-polarization regime, where the spin potential evolves perturbatively on top of a non-boost-invariant longitudinal hydrodynamic background. While a purely longitudinal $(1+1)$D description captures several features of global and local polarization, it cannot generate the observed quadrupole structure of the longitudinal polarization due to the absence of transverse dynamics. We, therefore, employ a $(1+1+2)$D framework that preserves the non-boost-invariant longitudinal evolution while incorporating transverse flow and an elliptically deformed freeze-out geometry. This framework reveals the physical origin of the quadrupole: the longitudinal spin-acceleration component coupled to the transverse flow and freeze-out geometry. The framework successfully reproduces the main RHIC measurements for Au+Au collisions at $\sqrt{s_{\rm NN}}=200$ GeV and extends seamlessly to Pb+Pb collisions at $\sqrt{s_{\rm NN}}=5.02$ and $5.36$ TeV, yielding very good agreement with available global and local $\Lambda$-polarization data across energies. These results pave the way for using spin hydrodynamics as a viable physical framework, validating its utility as a reliable tool to understand spin polarization and to extract intrinsic spin dynamics across collision energies, and possibly disentangle them from background thermal vorticity.