For those whom he foreknew he also predestined to be conformed to the image of his Son, in order that he might be the firstborn among many brothers.
There is no question that Paul is using the word foreknowledge here in its theologically pregnant sense of "fore-love" or "to have relationship in advance." (For a defense of that assumption you could try listening to the sermon I preached yesterday at GFC.)
That being said, it is worth considering again that before God said, "Let there be light," He had already set His love on those who would be His forever. When we doubt God in trials, we are doubting His love. We need to preach to our own hearts that glorious Truth that the One who "is working all things after the counsel of His will," is permitting (directing) our trials for our good and out of His infinite love.
The devil would be thrilled to have us believe that this God of ours is holding something back or making life miserable for us (perhaps just out of sheer caprice!). Nothing could be further from the Truth! This glorious God of the Christian has loved the Christian from before the foundation of the world - and He, the Sovereign One, has promised that He will never stop "working all things for good" for His own.
We are utterly blessed.
I say, own your trials (I write it trembling!) and glory in the love and wisdom of the Eternal.