A spring can store elastic potential energy by elastically deforming and moving its atoms out of their minima potentials. The atoms themselves can be modeled as balls connected by Hooke-like springs which are themselves supposed to model (an approximation of) the electromagnetic field. From this I surmise that the elastic potential energy of a compressed spring can be ultimately reduced down to electromagnetic energy.
Now my question is, is there a good argument that demonstrates that this is Galilean invariant as far as Newtonian mechanics holds?
This is difficult to think through because the EM field is inherently a relativistic object, and as far as I know the energy of the field is only defined in terms of its energy density. Note that for example kinetic energy is not Galilean invariant, so the question of whether potential energy is Galilean invariant is not obvious to me.
The biggest issue here is that at the atomic level, if we switch to a relatively moving reference frame, then we are no longer considering electrostatics, so it's not clear how to proceed in this scenario.