It's possible for past hardships to leave you emotionally messed up for years, which could make it harder for you to deal with future hardship.
I don't think there's a hard rule on this, and it depends on the mentality of the individual. It's possible for people from rich and poor backgrounds alike to be resilient.
But I do think emotional security helps you deal with challenges in life. It's not the only thing and it's possible there's other ways of dealing with it. But growing up in a secure environment makes a difference (note, this doesn't necessarily mean rich. It means stable. If you're rich, but a close family member dies when you're young or some other hardship occurs, you can still be emotionally hurt despite having an otherwise secure environment -- that's why it's a bad idea to judge people on their backgrounds, you never know the full picture)