Solving geophysical inverse problems with scientific machine learning