Money is only part of the issue.
Those who have rotated through outpatient know how boring primary care can get (Prescription refills, Chronic pain issues, chronic depression). Necessary services, but it takes a special person to love it. Toss in the ego beat-down of NPs claiming equality in skill and knowledge, and no wonder people aren't jumping in the doors of primary care. And the extra paperwork and quality measurement issues....whole separate reason people aren't jumping in the FM boat.
Lack of prestige, procedures, etc... are other facets of a complex issue
We really need more physicians of all kinds, not just PCP, we just happen to need PCP the most.
No, it is NOT just about the money. I started out with the idea of doing either primary care (general IM or fp) or cardiology. My ending up in cardiology had very little, if anything, to do with money. If money was the main reason I did things, then I'd be doing interventional cards (not happening, even though it pays lots more than general cards with only 1-2 more years of training). If that was the case then people wouldn't do academic cardiology practice (many still do).
If money was the only reason med students chose specialties, then neurology would be more popular (I think it pays a little better than IM, but is not very popular because a lot of people find it depressing IMHO). Dermatology is popular because of the cushy hours, the fact that people think it would be cool to do biopsies and only have to know *ONE* organ system (rather than have to deal with a lot of drug seekers and noncompliant patients with 10 different medical issues like primary care). Primary care is very daunting for a variety of reasons - many patients are hard to satisfy and think specialists are "better" (not always true, especially in cases of older folks who may value the old style "one doc does all" style), NP's and PA's are encroaching on the traditional primary care "turf" and sometimes selling themselves as being the same as a primary care doc, the insurance companies and gov't are putting more and more and more mandates on what primary docs must do to be considered competent/providing "good" care (they are supposed to make the blood pressure perfect, even if patient may not take his meds, make sure all screenings get done, even if patient doesn't show up, keep patient satisfied even if the insurance comp. expects you won't prescribe unneeded antibiotic for the patient's viral URI but patient wants it, not overtreat or undertreat pain [i.e. not too many narcotic rx. but then if patient still has pain they will blame the doc]). Also, in residency, primary care clinic (IM and FP, and probably peds) tends to get stuck with a disproportionate "social badness" patients who may not show up for or be eligible for specialist care and have to be managed (as well as can be done) in primary care clinic. These are poor people, with more social issues like homelessness, drug use, bad family dynamics, etc.
The reason primary care is filled with foreign medical grads is it's damn hard slog. I respect the hell out of people who choose to do it, but there are reasons why it's unpopular (other than money). Just trying to coax or force more med students into primary care isn't a long term solution - the "job" of primary care has to be made better.
I don't think there is a huge oversupply of specialists...there are probably the right amount of some (my sense is cardiology, GI etc. are about right) but with some maldistribution (Washington DC has too many cardiologists, but the entire state of New mexico has not enough). There are probably not enough of others (it seems like there aren't enough dermatologists in most places).