On the two-point boundary value problem for quadratic second-order differential equations and inclusions on manifolds