One point mentioning in this argument is that pilots take a substantial financial risk in their career in that they are self funded, and then their whole career is really tied to one airline thanks to seniority. As opposed to Doctors who while taking significant loss of earnings for a long time, once qualified are really never going to be unemployed and could work well into their 60's if they wanted to.
Pilot retirement is really around the 60 mark with few going much beyond that.
However it is much harder to qualify as a Doctor than a pilot it must be said