The shortage of doctors in the U.S. is due to the AMA cartel's control over university accreditation and corresponding rent-seeking state laws requiring accreditation. The result is speed-exams when you go visit a doctor (or maybe not see the doctor at all, but rather a "nurse practitioner").
The situation of pilots and doctors does seem similar on several levels, but I think you're drawing the wrong conclusions.
The proximate cause of the "speed-exams" is not a doctor shortage, but an artifact of how most doctors are paid - by the visit. You get a tiny bit more money for a long, complicated visit, but not nearly as much as if you see two or three patients in the same time. This is true for almost every payer - private insurance, Medicare, Medicaid, etc. The financial incentives are strongly on the side of the speed-exam.
A more fundamental question is why the financial incentives matter so much, and that's where I think the pilot and doctor stories have some overlap. These are both highly skilled professions with a long, poorly paid training period and a strong incentive on the part of the "payers" to keep downward pressure on wages. Every time an insurance company or Medicare cuts their provider reimbursement rate, the incentive to cram more visits into a day grows that much stronger, because when you start your career at 30 or 35 with hundreds of thousands of dollars in loans, it's hard to take an arbitrary pay cut. (Talking about primary care doctors here, the situation may be different for the "lucrative" specialist du jour.)
Besides, the US actually has plenty of doctors, similar per capita numbers to Canada or the UK. But the financial incentives drive too many of them to lucrative specialties and urban practices, leaving too few doing primary care or working outside the big cities. Attempting to control costs by cutting doctors' fees creates perverse incentives.
The rise of nurse practitioners is more of an alternative attempt at cost control than a response to too few doctors. If you don't need 8 years of school and training to take blood pressure readings or insert an IV, and these things are actually done better by people who do them all the time, maybe some aspects of primary care can be done better by people with shorter but more focused training.