A Variational Perspective on High-Resolution ODEs