That is a really great question, and one that is not easy to answer.
The problem lies not in the fact that there i not an answer but that the answer is complex and maybe not as specific as we would want it to be. What the bible does is paint a picture of why these sorts of things do happen. It paints a picture of the reality that we live in, and tells us about the God who rules over this reality, so that we might understand to some degree (but not completely) why these things happen.
The picture that the bible paints begins with the fact that this world is"fallen” - that is, it is cursed and broken. This stems from humanity’s rejection of God’s rule over their lives, presented to us in the first book of the bible - Genesis 3. As a result of this rejection suffering and death have became the norm for humanity. Since then, its a fact of life that people suffer and die, whether from war, disease, or poverty. Inequality is a sad part of this reality, and the bible is clear about this - it doesn’t cover up this tragic truth.
However while the situation may seem unfair and tragic, it is not hopeless. The bible clearly says that God rules over this world, and He has a purpose in allowing everything to happen. So even though there is suffering, inequality and poverty, it’s not because God has somehow"dropped the ball” on ruling the universe: everything that happens, was meant to happen, because God is ultimately the one the makes/allows things to happen. Jesus talks about not a bird falling out of the sky without God’s permission (Matthew Chapter 10, verse 39), and the apostle Paul talks about how God determines when and where people should live (Acts Chapter 17, verse 26). Paul goes onto say that God does this so that people might reach out for Him, and get to know Him - whether they be rich or poor (see Acts Chapter 17, verse 27).
The final thing to say about this inequality and suffering, is that God is not unaware of it but has done something decisive about it. In his Son, Jesus Christ, God entered this world of inequality, suffering and sin and died on the cross because of it. You see God takes our rebellion seriously and will hold us to account and since we all sin the outcome of this meeting will not be good for us. Yet at the same time he loves us and so takes the punishmnet for our rebellion upon himself - Jesus dying on the cross - so that through him we may be forgiven and not have to face the consequences of our sin. So while inequality and suffering is the reality of this world brought on by our sin, God has dealt with it and is giving us time to accept his offer before he says “enough”.
So in other words, there is inequality in this world because it is a broken world, caused by humanity’s rebellion against God’s rule. Yet God is holding back his judgement of our rebellion, allowing and even using the suffering and inequaity of the world, in order to give us a chance to recognise our rebellon and turn back to him. He understands our suffering (after all he suffered on the cross unjustly for our sakes) but also recognises that the alternative - his judgement and anger - is far worse for us; so he gives us time to turn back. This is why there is inequality and suffering in the world.