In Acts 10:34-35, Peter said "I now realize God does not show favoritism, but accepts men who fear him and do what is right". I believe sometimes God shows favoritism. In Romans 9:13 and Malachi 1:2-3, it is written: "Jacob I love, Esau I hated". Here God favored Jacob even with all the sins he committed. This shows that God sometimes discriminates. Why?
No one ever gets to live the life of another person. Just because one person lives in better or worse circumstances does not prove that God shows favoritism. God is about the spiritual life. The physical life is not the end state and is not the measure of what happens in the spiritual life. If we were to judge our spiritual life by what happens in the physical, then we would have to judge that Paul was among the most spiritually deprived people (II Corinthians 11:16-33) because he lived a physically miserable life.
There are two things that have to be determined first. What is meant by hate and who is being talked about?
The word "hate" does not have to be absolute, nor does it have to mean a feeling of extreme animosity. In Luke 14:26, Jesus is not saying that we have to loathe our parents in order to come to him. Rather, he is just pointing out the extreme difference in our love for our parents and our love for him. Our love for him has to be so high that our love for our parents comes across as hatred. We are still commanded to love our parents.
Malachi is talking about the nations and not about the original individuals. In the context, Malachi is talking about the land that each one possesses. Jacob's people did not get the land for several hundred years after Jacob was dead. Therefore, the men are not being discussed, but rather the nations that came from those men. Putting it together then, it makes less sense to say that Esau personally was hated (as in extreme revulsion) from before he was born. Rather it makes more sense to say that Esau and his descendants were hated (favored far less) than Jacob and his descendants.
The later meaning of hate is what is meant because we see in Malachi that God's hatred of Esau resulted in Esau being given a mountain wilderness for a home. There are many people who live and continue to live in mountain wildernesses and they are grateful for it. It is not that being assigned a home in the mountains is a sign of condemnation -- it is only a sign of living in a place that is less desirable than other lands. By comparison, Jacob was given a lush land.
Now getting back to Romans 9:10-14, "Not only that, but Rebekah's children were conceived at the same time by our father Isaac. Yet, before the twins were born or had done anything good or bad—in order that God's purpose in election might stand: not by works but by him who calls—she was told, 'The older will serve the younger.' Just as it is written: 'Jacob I loved, but Esau I hated.' What then shall we say? Is God unjust? Not at all!" Again, the question is about who is being discussed. The nations of Jacob and Esau or the men, Jacob and Esau? You would actually be hard pressed to find a passage that says that Esau ever personally served Jacob. In fact, at the last meeting of Esau and Jacob, it is Jacob who is bowing to Esau (Genesis 33). In Genesis 33:9, Esau says that he had plenty -- an indication that God was blessing him also.
What we are left with is that God determined that He was going to make both boys into great nations and one of those nations was going to be greater than the other. So, He told of His plan from before they were born as to which one was going to be the greater. And He determined that before either one of them did anything to deserve their lot. And all of their children who came afterward were born into the blessing of their father. They inherited a blessing because that was God's plan. It certainly wasn't because they earned it by being holy for all their generations. Malachi's complaint was that Jacob was not behaving any better than Esau. Neither one was deserving of what they had.