Notwithstanding the fact there are companies that under-invest in their employees, you make it sound like engineers are being forced to try to maximize compensation.
The reality is that compensation varies, and the differences can be quite pronounced in the technology industry. A startup with minimal revenue and $1 million in funding probably isn't going to be able to compete with Facebook or Google on salary and benefits. Expecting it to is like trying to get blood from a stone.
There is nothing wrong with trying to maximize your compensation at the cost of everything else, but if that's your approach, you need to live with the fact that you will almost always have better opportunities somewhere else. Constantly lamenting the fact that your current employer can't pay you as much as another employer can is no way to live life.
Incidentally, in my experience, a lot of people who allow their job satisfaction to be based entirely on a perception of relative compensation are never happy no matter how much they make. They constantly find ways to convince themselves that they could and should be making more.