What exactly is the state of Earth and humanity in the Portal universe?
It is unknown and unknowable.
The game keeps a lot of information from the player. This is for several reasons:
- to keep the atmosphere of "locked in a lab".
- it is in keeping with the Half-Life series, which Portal is connected to. A lot of details in Half-Life are kept vague.
- another reason is to have the game mostly standalone. Portal has a completely different gameplay, themes, and characters. One of the design goals (stated in Portal 2 - the Final Hours) was to keep it separate from Half-Life.
We only see the labs that Chell tests in, and we only know the information that we are given but never much tools to verify.
On lies and misinformation
However, this seems to contradict what you're told earlier in the game. In the first game, GlaDOS says
Are you trying to escape? [chuckle] Things have changed since the last time you left the building. What's going on out there will make you wish you were back in here.
GLaDOS does try to manipulate you throughout the first game. She is very well established as untrustworthy. Most notable lie is
the cake
but there are many others. From Portal 1:
GLaDOS: Have I lied to you? [pause] ... I mean, in this room?
It is not at all a stretch to expect the statement by GLaDOS about the world outside is either complete fabrication, or a very embellished. The very consistent goal we have seen from her is that she constantly acts antagonistic, manipulates, and gaslights Chell.
A lot of time has passed
Even if we do take the statement by GLaDOS for true at the time, that need not be the case at the end of Portal 2.
Here is a brief timeline:
- 2000-2009: Half-Life 1 starts. Valve have kept the start year in Half-Life deliberately vague, just like details in Portal are not revealed. However, we do know the resonance cascade and the subsequent alien invasion(s) are set somewhere in 2000-2009. Everything develops quite quickly after the incident: portal storms start raging across Earth and bring in flora and fauna from Xen. We can call that "alien invasion 1". At some point during these unforeseen consequences another alien empire, known as the Combine, launch their invasion (invasion 2) of Earth. They are successful almost immediately - their take over is known as "the seven hour war".
- 2010(-ish): Portal 1 takes place. This is the date given in "The Final Hours" ebook (chapter 8: The power of paint, page 4 of 9). It is stated it happens between Half-Life 1 and Half-Life 2. At best, in Portal 1 GLaDOS might refer to the Xen invasion or the Combine invasion, if they are ongoing. Or it could be the years after the Combine take over and start subjugating humanity. We can then use 2010 for easy reference. We do not need to be more precise than this for now.
- 2020-2030: Half-Life 2 starts. HL2 takes place around two decades after the Black Mesa incident. Which puts the events somewhere in 2020-2030.
- 2060-52010+: Portal 2 starts. No, that is not a typo - Portal 2 takes place between 50 years and 50 thousand years (or more) after Portal 1.
The 50 000 number is from "The Final Hours" ebook of Portal 2 - where the developers stated the intention was that Portal 2 would be cast far in the future. But more important is the reason. From Portal 2 - The Final Hours ebook (chapter 8: The power of paint, excerpt from pages 4 of 9 to 6 of 9):
The team never really figured out how much time had passed between Portal 1 and 2.
[...]
the team left a few hidden Easter eggs for players to find, but in truth the desire was to separate Portal from Half-Life, not to provide a surprise bridge to the next Half-Life game. "If we did too much teasing, players would just say, 'Give us Half-Life 3 you bastards!'" explains Wolpaw.
One way to further differentiate Portal and Half-Life was to set the game far into the future - at least 50,000 years.
Thus we do know that the current year quite far from Half-Life 2.
The 50 years is an extrapolation from what has been seen in the game - it would take a long time and the minimum "long" for the facility to fall into the condition we see it is at least 50 years.
At any rate, even if we take what was said in Portal 1 to be true and it was indeed preferable to be a test subject inside the Aperture Science Labs, then that is no longer necessarily the case at the end of Portal 2. Although, even if Portal 1 were set during the Combine regime, life there might be preferable to being a test subject in mortal peril under the constant control of an insane robot.
We are not given much if any information about the state of the world in Portal 2. And given the enormous (and ill defined) time gap, there is not much we can extrapolate from.
We can take the end scene as truth and it still does not tell us anything of value. The most we can say is that it is open to interpretation. Maybe Chell died and this is the afterlife. Maybe the ending tries to inject some optimism to contrast the dark and oppressive undertones of the rest of the game. Maybe there is nowhere to go - there might be no humanity left.
As with many things - the ending is deliberately vague. This echoes back the ending of Portal 1, which was also completely open to interpretation whether Chell survived or not or whether she even escaped. That ending was later patched in preparation for Portal 2 to set up the sequel.
This is debatable how it can be taken but: during the end of Portal 2, we get a glimpse of Earth from space and it looks similar to present day Earth. In particular, the water we see on the surface is like today. This is very notable, since the Combine were supposed to have drained the oceans. The fact can be interpreted as either:
- Sufficient amount of time has passed since the Combine are no longer there and Earth nature has restored the oceans. If this is the case, it does not tell us anything about the state of humanity or wildlife. It does not even tell us whether the Combine were driven out, if this is indeed tens of millennia later, it could be that they simply left after finding no more use from Earth.
- This could also be unintentional and it was a reused Earth asset.