I think it's primarily developers in other countries[1] that are getting severely underpaid. Hopefully that changes in the coming years.
[1] The most egregious example might be India. Around 7 years ago, I was on a plane from Kerala (a state in India), and the guy sitting next to me happened to run a software consulting company (in Kerala). His customers were from Japan and some other countries (can't remember), and his company wrote Linux drivers for proprietary hardware. He hired kids right out of college. I asked him how much he paid them, and he said without blinking, Rs. 15000 per month. Type in "INR 15000 to USD" to Google, and you're in for a shock. It's around $2600 per year, but probably closer to $3000 per year at the exchange rates back then.
American developers doing the same job could earn up to 100 times that, and at the very least 40 times that amount. I can't understand why on Earth salaries are 40 to a 100 times higher for the same exact work, and for work that could be done by anyone anywhere on the globe, but I hope this massive difference in pay converges and disappears soon.
I really really hope with the recent IPOS, all the devs that made good money end up doing startups that are more employee friendly than VC friendly.
But then, this is the ugly world we live in. The selfish gene yo!
If it's any consolation, not much more makes it to the talented developers in commercial products, either. It mainly ends up going to executives and sales.