Very interesting set of facts, observations and analysis.

One thing I'd add are the forces of supply and demand. Here are my facts/observations about those in the US:

I'm not sure about other STEM professions, but the demand for programmers skyrocketed in the '80s with the supply of capable and necessarily cheap microprocessor based computers. It's hard to express what a sea change this was, from wiring together discrete logic to being able to put an entire CPU on a single chip which massively decreased cost, increased reliability and in time allowed for very high preformance (compared to their discrete ECL high end competitors; for the most extreme example the initial Cray-1 announced in 1975 ran at 80MHz).

At the same time semiconductor DRAM allowed an explosion in the size of programs and all together these allowed an orders of magnitude preformance escape from the constraints that had been with us since, say, the very early 60s.

There were a variety of supply based responses to this including the 1990s? H1-B visa program; their success can be judged by the inflation adjusted wages earned by programmers and the post-dot.com crash in CS major enrollment (don't know about other schools but MIT lost more than half, in a department that had had steady and very high enrollment (40% of the undergraduates) since the beginning of the '80s or earlier).

I was personally on the science track in the late '70s (high school and first term of college) and I could by the end of that decade see the supply of biologists starting to outstrip the demand. Chemistry might be weird since it became politically unfashionable by the end of the '60s, but physics certainly had an oversupply by the time that the US Superconducting Super Collier was canceled in 1993 (at least one MIT department had a line of students transferring out of the physics department into it on that day).

Yet starting sometime in the '80s the NSF began a major "We don't have enough STEM workers!" campaign that continues to this day. Similarly we see executives like Bill Gates and Intel's CEOs (not just this one) demanding more foreign workers at a time of high unemployment and wage stagnation at best in the fields they're recruiting from. One should also note that the last time I checked Intel has a policy of firing the "bottom" 1/10 of their employees every year so if they're still doing that (and officially or not, it would have become part of their culture) their annual recruiting requirements will therefore be rather extreme.

(That said, the very best are always scarce and hard to find, recruit and retain, but that relative handful is not what we or they are talking about.)

Anyway, I believe that due to the above supply and demand mismatches, prior to the start of the Great Recession the US was seeing a major drop in US originated students in STEM college majors (by that I mean not including say the children of 1st generation immigrants who often weren't clued into these major shifts, I'm assuming 2nd generation and beyond recognized what was happening) and it was far worse in graduate programs.

Of course the Great Recession is looking to be a great game changer as ones often are. STEM careers may suck, but they could easily beat paying out of your own pocket for a law degree in a market that's crashed or for a doctor's education when we're at the brink of a "fundamental transformation" of America's medical system that includes a major obsession with decreasing costs (as it is, the government is already paying for almost half the nation's medical care...).