Though I love the market system in general, it's pretty clear to me that neither salary and skills nor salary and societal good are anywhere near linear (or even monotonic for that matter) across fields.
School teachers, nurses, and regional pilots are three fields I can think of where we may well have skill shortages despite fairly low wages. (in the third case, I think it's because of low wages, but no matter...)