In a way, our current free-market capitalist system solves a distributed optimization problem, using prices as a signal. It is distributed because each unit (person, business) is free to make its own decision. The profit motive is useful as a signal for optimization. But it is not necessary optimal; I believe it is a proxy for something else, namely overall human welfare, and good functioning of society, but since we cannot easily measure or agree on these other things, we use price. Whenever we use a proxy to optimize a different objective, it is possible to 'overfit' [0], i.e. get worse on the real objective. I feel we will see the emergence of other, maybe better, systems, in our lifetime. Its good to see people are thinking along these lines [1]
[0] https://sohl-dickstein.github.io/2022/11/06/strong-Goodhart....
The system doesn't really solve for anything. Each individual person does so. Price isn't utility. It's just the costs. We two people engage in a trade, both sides profit. A business can only profit if it can supply things at a cost less than people's utility. For a price X, the company's utility is X-Y, and my utility is X+Z. We make the exchange and both profit by it. Overall, we are Y+Z better off. For each person, that Z can be anything. For you, it could include the total impact on human welfare. There's no central optimization being done as each person is optimizing their own function. That's a mistake that far too many people make.