We largely agree that children (so... everyone) is born into a socioeconomic setting that is not by their choice.
The early, some would say "formative," years of a person's life are set against this backdrop.

I think we can agree that there are dramatic differences in the public education system based on the economics of the local region.
At the very least, I think we can agree that the number and quality of economic opportunities that are presented across different economic profiles vary dramatically.

So we agree that the system we revere as being open to, or even encouraging, social mobility has its flaws.

Which seems to imply that we agree that, while there are individual exceptions, most people enter their adult life with a certain amount of financial acuity, and that this is (at least for many) beyond their control.

So I'm back to the question, is it just to have a legal system which rewards and punishes citizens based on circumstances that are largely beyond their control?
If no: What are the perils of attempting to address this systemic injustice?