A Lie-Hamilton system is a nonautonomous system of first-order ordinary differential equations describing the integral curves of a t-dependent vector field taking values in a finite-dimensional Lie algebra, a Vessiot-Guldberg Lie algebra, of Hamiltonian vector fields relative to a Poisson structure. Their general solution can be written as an autonomous function, the superposition rule, of a generic finite family of particular solutions and a set of constants. In this paper (arXiv:1612.08901) we pioneer the study of Lie-Hamilton systems on Riemannian spaces (sphere, Euclidean, and hyperbolic plane), pseudo-Riemannian spaces (anti-de Sitter, de Sitter, and Minkowski spacetimes) as well as on semi-Riemannian spaces (Newtonian spacetimes). Their corresponding constants of motion and superposition rules are obtained explicitly in a geometric way. This work extends the (graded) contraction of Lie algebras to a contraction procedure for Lie algebras of vector fields, Hamiltonian functions, and related symplectic structures, invariants, and superposition rules.