Society producing a neurosurgeon isn't useful to someone who can't afford to be treated by a neurosurgeon.
Nor is it useful to someone whose circumstances lead them to die of some more pedestrian cause before they ever need someone as specialized as a neurosurgeon.
Someone who can't afford it can still collect money for it, or society can decide to pay. They can also try to earn more money. And more neurosurgeons bring the price down.
Instead of fretting how rich people have an unfair advantage, we should try to give more people that advantage.
And say it takes a rich family to create one Neurosurgeon. Shouldn't we be happy that society is able to produce some Neurosurgeons?
Another note: genetics and evolution are not random luck. People struggle to find partners with good genes.