Nope, not that, either: the supply of doctors, for instance, is deliberately restricted by the American Medical Association; whereas the supply of elementary teachers is not restricted by the CAEP. Supply and demand are still second-order effects here.
If the supply of doctors is restricted, then you'd expect them to get higher pay, and vice versa with teachers. I agree it is a secondary effect. The cost of training/education required to perform the job is bigger, though it ultimately has the same effect of reducing supply.
Were we to, say, stop the cap on H1-Bs in the medical profession, doctors' pay might migrate down towards teachers' and the OECD average (and US healthcare might be affordable).