A free market of voluntary transactions solves this problem
That's the whole reason why subsidies are a thing, and they are extremely effective for all kinds of common good. Indeed, that's the whole point of governments generally, to enforce the common good that falls through the cracks of market dynamics (and well, to ensure a fair market in the first place).