Paul Graham wrote an long essay decades ago that basically says if you want to be paid what you're worth, then work in the context of a small company. http://www.paulgraham.com/wealth.html
I read this article before and I think this might apply to a 5-10 person startup. An engineer’s ability might be easily measured there. But the problem is startups at that scale usually don't have that much money to pay engineers. That’s probably why you see the reverse.