Things that benefit everybody may sometimes disproportionately benefit some entities more than others, but that is the price of having something that's indiscriminately beneficial to everyone. On the other hand, the amount of people who get to benefit from those things is still vastly greater than something that is limited to benefiting just an exclusive group.
If anything, I think the way a lot of open source software winds up playing out just makes the economy a bit more efficient. Everyone does not have to write Apache or Nginx, or pay a lot of money for it. Everyone, from Spotify to some guy named Eric, can run Nginx on a server and do interesting things with it.
I'm all for fixing wealth inequality but blaming open source for it seems like a terrible mistake. Open source software certainly didn't cause the wealth inequality of our society, and it's not even clear it has yet made it much worse.