What does a non-Jew have to do in life? Why did God create non-Jews? A Jews purpose in life is to learn Torah and do Mitzvos. What should a non-jew be spending his time doing?
לעבדה ולשמרה. Their purpose is for this world. They are supposed to run it well, behave properly and morally, and develop the natural world. They aren't בני עולם הבא just like other creations aren't. When the world ends everything in it ends. Those who are imbued with a נשמה, have an element of עולם הבא which will live on in עולם הבא. Without that there is nothing to live on in a realm devoid of our current reality.
The Rambam writes that if they do decide to do good things for Hashem's sake then they too live on in עולם הבא.