Yes - salaries/wages are more about your value to capital for sure - if you can make rich people richer or at least protect their capital then in a free market of course you demand a higher price. The value that 100 000 people put in the dignity of elderly people who need care is swamped by the value 3 billionaires put in protecting their interests.Plenty of jobs (finance, real estate I'm looking at you) are not paid based on value to society, just on profit.
There are other things at play though, like leverage. If nurses, teachers etc could mobilise and seriously strike they could probably demand a lot more - but we all gotta eat.