A doctor's starting pay (family practice) is $175,000, with maybe a $100,000 sign on bonus. More, if you practice in a remote area where no one wants to work....
A PHD engineer will be lucky to start making $175,000 10 years later.
Both spend about the same amount of time in education.