Physically Driven Self-Supervised Learning and its Applications in Geophysical Inversion