This scripture does give one pause for thought. It seems out of place with God's character throughout the New Testament. However, when thinking about it, clearly God chose Jacob to be a leader and Israel to be his people. Even though he chose Jacob before he was born and had not done any good or evil....God still knew who to choose for service.
Does this mean that he actually hated Esau and sent him to hell without a chance for repentance. I don't think so. After reading the story of Jacob and Esau, you can see that Jacob did want to please God and Esau was more concerned with pleasing himself. After all, Esau did choose to sell his own birth right. God didn't make Esau do this, it was Esau's choice. So in my opinion, this shows that God has the foresight to choose people for service. Before it even played out, God knew how it was going to go.
I think, the same can be said for the scripture that states we were chosen in him before the foundation. Scripture also states that the lamb was slain before the beginning of the world. We know this was not actually the case, so it must be speaking of God's foreknowledge. God made a plan for salvation, in that he sent his only begotten Son so that whosoever believes in him should not perish. If we accept and believe in him then we are elected in him. If not then we will surely perish. Put simply God has the foresight and foreknowledge to know who will believe, obey, and accept his gift and plan for salvation and who will not. He doesn't make people accept it and he doesn't reject anyone. It is the persons choice, yet God knows the beginning from the end. He is the alpha and omega.