Lagrangian dynamics in non-flat universes and non-linear gravitational evolution