My wife is an electrical engineer, so let me just state what she tells me unequivocally: There is no such thing as a shortage of American STEM graduates in this country. Those internet companies only wanted to increase the supply of STEM grads in order to drive down the cost of labor.
Having said that, what would happen if foreign STEM graduates were issued green cards upon graduation? At some point you are going to see American citizens with STEM degrees toss a Holy Hand Grenade into the political scene.
http://spectrum.ieee.org/at-work/education/the-stem-crisis-is-a-myth
This. A thousand times this. STEM degrees are not lacking, there's no shortage of people in the field. Plenty of smart people already have degrees, they however like to be compensated for their work and intelligence and get in the way of companies' bottom lines.
However, the Silicon Valley crowd is smart enough to realize outsourcing is toxic, so they push the myth of, "I'd love to have American workers...but there's nobody to hire! So I just have to hire these Indians...who coincidentally are happy with slashed salaries."
The truth is much more complicated than this. Yes, there is a shortage, but not in the way of "missing degree". Yes, the degree is just an excuse but there is an argument to be made for shortage.
The reason is too many Chiefs, not enough Indians. Basically, companies need people willing to do dirty work or intellectually unsatisfying work. Who would want to spend years and years doing theoretical proofs and math (what most STEM degrees are) then spend the rest of their lives doing vendor-specific grunt work with Microsoft, Oracle, Salesforce or what have you. Who wants to spend all those years training to be a manager or a boss, but then become a code monkey? Who wants to be a villager when you can be a lord or a king? Some people might, but not all STEM grads.
The usual answer of that, from people like your wife is "pay enough money and I will do anything". No, that's not true, at least not from business people's perspective. If you pay loads and loads of money, all that will happen is people will "tolerate" the work, possibly do it subpar because they are unhappy with it, then leave at the first opportunity. There is also the problem I call "know it now". You are worth X dollars if you know it, right now, instead of taking 3 months or 6 months or 12 months to learn it. A highly theoretical degree with a lot of math and science doesn't necessarily help with using X software or knowing Y new technology. It could and it should, but it doesn't always. That means ramp up time. But, business can't afford ramp up time, because money waits for no one. So they want to take the Indians, because their degrees include very vendor specific software specific knowledge. That is the definition of a true shortage, not just money or some great conspiracy.
Basically the problem will ALWAYS exist, because taking higher education is a calculated risk in the Western world. You take it, to get more money and a better job and a better life, which in most people's minds does NOT include coding or programming or even engineering (there's a reason why a lot of engineers go into sales... it's because they consider it a better lifestyle that coincidentally pays more money because that's the way capitalism works). It is not accurate to make assumptions like, "if only they paid more money people would take the awful jobs"... what kind of life would you want, working 9-5 (really 10-4) where the vast majority of your time is talking and analysing and making decisions, or working 8 to 6 (REALLY starting work at 8) where the vast majority of your time is grunt work or learning the latest new technology? The answer is obvious.
So the answer is, yes you need more people with STEM degrees, but not because of lacking degrees. Degree is a necessary but not sufficient condition, what is sufficient is far more elusive. Because, only a small percentage of people are actually willing to do the grunt work, and the work has to be done, somehow. My view is that offshoring and outsourcing is good, because it allows those people who want to be bosses and managers people to boss around

.