High-resolution spectroscopy of ${\mathrm{Nd}}^{3+}$ in ${\mathrm{Nd}}_{2}\mathrm{Ba}\mathrm{Ni}{\mathrm{O}}_{5}$ and ${\mathrm{Y}}_{2}\mathrm{Ba}\mathrm{Ni}{\mathrm{O}}_{5}:\mathrm{Nd}(5%)$ powder samples is used to study ${\mathrm{Nd}}^{3+}$ crystal-field levels and exchange splittings in these quasi-one-dimensional model compounds. We demonstrate that the ${\mathrm{Nd}}^{3+}$ ground-state splitting in the magnetically ordered state of ${\mathrm{Nd}}_{2}\mathrm{Ba}\mathrm{Ni}{\mathrm{O}}_{5}$ (${T}_{N}=47.5\ifmmode\pm\else\textpm\fi{}1\phantom{\rule{0.3em}{0ex}}\mathrm{K}$, as found from our spectroscopic data) accounts for the low-temperature magnetic properties and for the $4\text{\ensuremath{-}}\mathrm{meV}$ mode observed earlier in inelastic neutron scattering experiments. Crystal-field analysis is performed. Its results show that the directions of ordered magnetic moments in ${\mathrm{Nd}}_{2}\mathrm{Ba}\mathrm{Ni}{\mathrm{O}}_{5}$ are determined by the single-ion anisotropy of ${\mathrm{Nd}}^{3+}$. We argue that the crystal-field parameters obtained for Nd-nickelate (in this work) and Er-nickelate (in our earlier work) can be used to predict the energy-level patterns and magnetic properties of other rare-earth linear-chain nickelates.