Connecting phases of matter to the flatness of the loss landscape in analog variational quantum algorithms