A Variational Approach for High Order Least Squares Problems on Riemannian Manifolds