The preferred The Outer Limits version: the peaceful folks living in fear of alien invasion are really humanoid aliens. The aggressors? Humans. - this variation also a classic The Twilight Zone episode- "The Invaders".
Instead of believing it to be a different place, believe it to be a different time. You believe you're in caveman days, but later realize you're in the future After the End, or you believe you're in the future, but later realize you're in the past during an enlightened period that will later get destroyed (with all record of it also wiped out).
In Combat Mecha Xabungle, the low-tech worker-caste "Civilians" scrape out a hard-scrabble existence on a desert world, believing themselves to be descended from Terran colonists; over the course of the series, the planet is revealed to be (of course) Earth, stretched to the very end of its ecological rope. The 'colony' story was spread by the high-tech ruling-caste "Innocents" to cover up their plans to escape off-world and leave the Civilians to die.
In Eureka Seven, it turns out that the planet everyone escaped to to get away from the aliens invading Earth is actually Earth itself, transformed by the scub coral into a mostly-unrecognizable shape.
There are sufficient hints at the end of Mai-Otome to make the viewer at least wonder if the apparent colony world is in fact a far-future and much-changed Earth.
Parodied in Keroro Gunso: Giroro and Natsuki get warped into a Desert of the Real by accident, and while searching for signs of civilisation, find it in the form of a familiar landmark in the series, the NPG Radio Tower - in ruins. The untwist: they're NOT in the distant future, the tower was merely declared obsolete after the NPG company built a better one. And there's several other previously obsoleted towers in the immediate area, just to hammer the point home.
Yasuhiro Yoshiura's Pale Cocoon inverts this. It was the Moon all along. People thought they were living under destroyed Earth, and lost most of their historical records, but actually they were living in a Moon-colony with artifical gravity where people escaped environmental destruction. And when the protagonist looks at the sky for the first time, he sees blue Earth shining in the sky, as a sign that the planet has healed long ago, but no-one had thought to look.
Psyren, Volume 01 Chapter 005/006: The strange unnatural world that Ageha finds after being transported by a magical telephone call (no, really) is none other than a devastated Japan, as revealed by the crater-scarred face of Mt. Fuji.
Vandread the robotic aliens that pest the protagonists for most of the story turn out to be drones sent from Earth to harvest living organs.
Inverted in Solty Rei, where the people were made to believe that they were on Earth after a major disaster, but turn out to be colonists on another planet after a major disaster cut the colonization process drastically short.
The last few episodes of Brigadoon: Marin and Melan indicate that Brigadoon, which had appeared to be a different world, is Earth in the distant future.
Toriko Chapter 259 reveals that the Earth the characters live on is Earth, with much, much more territory added on by a mysterious mineral.
The 2003 Fullmetal Alchemist animereveals that it is set in an Alternate History of Earth, which also exists as we know it in a parallel universe. The two worlds were the same until their histories diverged when alchemy worked in one and didn't in the other, splitting them into two separate dimensions.
In the Doctor Who Magazine comic The Glorious Dead, the Doctor discovers that the planet Dhakan is in fact Earth with an altered history, after the discovery of St Paul's Cathedral.
In Diaries of a Madman, thanks to Dramatic Irony the reader finds out early on that Equestria is actually set on a version of Earth far into the future after humanity is (mostly) extinct, but it takes some time before the human protagonist finds this out for himself.
The original 1968 film version of Planet of the Apes, where the revelation that protagonist George Taylor is back home comes when he comes across the ruins of the Statue of Liberty, which acts as The Constant. (The 2001 remake, while treading the same ground, uses a quite different ending based on that of the original French SF novel; in the novel, one crewmember manages to return to Earth, but discovers that the Ape takeover happened to Earth too in the meantime, and takes off again.)
World Without End, the first sci-fi movie filmed in Technicolor CinemaScope, told the story of a group of astronauts on a space mission who crash land on an unknown, Earth-like planet. They know it can't be Earth because there are no radio signals and the radiation count is too high. They learn the truth about the planet when they encounter a graveyard.
In an interview, the film's director Ed Bernds said, "If anybody could sue anybody, I could sue Rod Serling for Planet of the Apes, because they definitely used my ideas about space travel and time travel in making that picture."
In the book, it was made very clear where they were to begin with — Washington was not in ruins; it was not After the End, but just in a Brave New World-like pleasure culture. This is why they wind up safe not on Earth but on a space station orbiting Mars.
Shua spends much of Sky Blue talking about how great Gibraltar will be, and how he'll go there after the fall of Ecoban. Guess where Ecoban is.
The Czech science fiction film Ikarie XB-1 (released in the US as Voyage to the End of the Universe) actually gained one of these through Cut-and-Paste Translation; in the original film, the characters were human astronauts seeking "The Green Planet"; the Americanized version of the film added stock footage of New York City to the scene where they finally discover the planet, changing the ending from The End of the Beginning to Earth All Along.
Parodied in the mockumentary The Independent starring Jerry Stiller: one of the films Morty Fineman creates is entitled What Planet is This (Oh My God it's Earth).
Combined with Breaking the Fourth Wall in the Soviet film "Per Aspera ad Astra". The plot revolves around helping the planet Dessa to recover from a self-inflicted ecological disaster. In the end the film stops being sci-fi and becomes surrealistic, then ends with the note "All images of the dying world Dessa were filmed on Earth".
The short story The Hunters has an invasion by ferocious aliens who destroy the civilization of the planet. At the end it is revealed that the invaders are humans.
The Nitrogen Fix by Hal Clement kicks this up a notch by making Earth actively uninhabitable to human beings (as in, survival domes and oxygen masks), and introducing an alien race that thrives in the new environment.
In Grant Naylor's Red Dwarf novels (not the TV series), Lister is trapped on Garbage World, where humanity has dumped centuries' worth of its waste, for 30+ years. Early on, he finds the oil- and acid-rain-soaked, but still recognisable, shape of Mount Rushmore with its five presidents' heads (don't ask).
In Andre Norton's Star Rangers, a decrepit patrol ship from a decaying human-dominated galactic empire finally breaks down for good far from the galactic core and its civilizations. The faraway fringe world on which our heroes are stranded seems almost too perfect to the human crew members, though...
An odd variation in H. Beam Piper’s Lord Kalvan of Otherwhen. Hero Calvin Morrison assumes that he’s been thrust forward in time to a post-apocalyptic Earth, until he sees the outline of a familiar mountain range, and realizes it shows no sign of strip-mining. Since the amount of erosion necessary to eliminate the evidence of man’s work would also make the mountain’s silhouette unrecognizable, this makes him realize that he must be in a parallel universe instead.
Ea of David Zindell's Ea Cycle turns out to be Earth millions of years into the future.
A variation: Larry Niven's A World Out Of Time has a relativistic spaceship pilot trying to return to Earth millions of years after he set out, and since the solar system has undergone extensive remodeling since he left and his computer has gone crazy, he can't tell whether it's Earth or not. And since the launching system he needs to get back up to ramscoop speed is long gone, he has to figure out which is true before he stops— because once he does, he can't go anywhere ever again.
Another Larry Niven example comes from his "Draco Tavern" stories: the chirpsithtra remember a civilisation they met millions of years ago, whose planet was undergoing geological upheaval, and a green blight was taking over the oceans, converting much of their atmosphere into oxygen. This killed them off in the end, but created the conditions necessary for us and (almost) everything else we know.
In J. R. R. Tolkien's unfinished story The Notion Club Papers, a man learns to astrally project himself and so visit distant alien planets. After describing several of them, he then came across a world where he watched what looked like a teeming anthill spread disgustingly across a verdant countryside. He then realised it was Earth All Along, and he was watching a sped-up history of his own hometown of Oxford.
In Christian Cantrell's "Containment", the protagonist lives in a colony on Venus, and is trying to solve various environmental problems but it turns out the colony is actually on an apocalyptic wasteland Earth, and the problems he has been assigned are actually to make money for the colony / control the air supply
In The City of Ember, the city turns out to be underground on Earth. Human beings lived there for centuries; the idea was to protect them from nuclear war, but they lost the evacuation instructions years ago, and no one was around to tell them that the apocalypse was over and they could all go home now.
"Doctor Who And The Hell Planet", a short story by Terrence Dicks in which the titular Hell Planet (full of volcanoes and dinos) turns out to be prehistoric Earth. The Completely Useless Encyclopediaacerbically suggests it would have been a much better surprise to reveal it wasn't prehistoric Earth.
The Helmsman Saga's first books contained some references and allusions implying it occurs in the very distant future. Then, in Book 8, the protagonist's ship is lost, and his Escape Pod lands on Earth in the 60s.
Surprisingly, Septimus Heap. In one of the final scenes of the final book, Fyre, Septimus writes the current date on the snow outside the House of Foryx. It reads: July 4, 12,004.
Implied earlier on, when they reference the the few remaining technological miracles from the "Days Of Beyond", which you can guess are supposed to be the present/not-as-far future.
Subverted in The Psalms of Isaak. The world the series takes place in is After the End, heavily uses magitek (some bits of which are recognizable analogues to present-day technology), and is heavily implied to be Earth. The fourth book reveals that the planet's name is Lasthome, and it's actually a Lost Colony of a spacefaring human civilization, presumably from Earth.
The children's novel Galax-Arena by Gillian Rubinstein is about children who are abducted by a man named Hythe and seemingly taken to another planet and forced to perform high risk acrobatics as entertainment for aliens. This scenario turns out to be a ruse designed to quash all hope of escape; the "alien" spectators are humans in disguise, the "planet" is a secret facility in the desert and the children are not entertainment, but lab rats.
Despoilers Of The Golden Empire lives on this trope. It presents itself as a science fiction story about a military expedition to another planet, and is written in very scientific-sounding prose, but the story is actually about the conquest of Peru in the 1500s. In this case, it is only the reader who is fooled; the characters in the story all know full well what planet they're on. Hints are given to this fact throughout the story, though:
The sun, a yellow G-O star, hung hotly just above the towering mountains to the east.
Live Action TV
The Doctor Who serial The Mysterious Planet did feature the discovery (due to a Tube sign) that the planet the Doctor and Peri were on was actually Earth and it had been shoved half way across the galaxy.
In The Outer Limitsrevival episode "The Light Brigade", the crew of a stricken ship must launch a Doomsday weapon on an enemy planet in order to save humanity. However, in one of the Cruel Twist Endings the revival series became infamous for, the aliens had tricked the crew into believing that that they were in orbit above the enemy planet, when in actuality they were above Earth, and our heroes end up nuking our own planet.
Stargate SG-1, "Solitudes": Two members of the team seem to have been shunted to the wrong planet due to an overloaded Stargate. Turns out it's a second Earth gate, buried under the ice in Antarctica. This also serves as a great big lampshade for the whole Single-Biome Planet thing.
The The Twilight Zone episode I Shot an Arrow Into the Air features 3 astronauts crash landing on what they think is an unknown desert planet. At the end, it is revealed that the "desert planet" is actually a stretch of Nevadan desert about 97 miles from Reno. Only one astronaut survives the infighting over water and supplies to discover this.
In the Metal Heroes series Jikuu Senshi Spielban, it is revealed that the planet Klin, the once-beautiful now-ravaged home of our protagonists, is Earth in the future, and they were sent to Earth through time rather than space.
Appears in the Music Video for "Sing For Absolution" by Muse. After flying a spaceship across the galaxy, Matt Bellamy and his crew collide with an asteroid and plunge onto a desolate desert planet. They step out... and find themselves on the ruins of Westminster Bridge, London, with the smoking remains of the Houses of Parliament behind them.
A kitschy Leonard Nimoy track called "Visit to a Sad Planet" ends with an unsurprising revelation.
A hybridization of Earth All Along, the Adam and Eve Plot, and an anti-Earth All Along occurs in the '70s BBC Radio Drama Earthsearch: The crew of the colony-ship Challenger tries to return to their home planet, Earth, to find it missing, and finally decides to settle on the new planet Paradise. Paradise is a lot like Earth, but it has saltwater oceans, and a heavily cratered moon. They eventually start referring to the planet as "their" Earth. There are a number of clues and red herrings — the other planets in Earth's solar system have different names, but we're told that the planets were renamed centuries earlier, for example. Just in case you didn't work out the original "Earth" wasn't Earth at all, the sequel begins with a global flood.
The prequel, Earthsearch: Mindwarp takes place in an underground complex thought to be surrounded by rock infinitely in all directions, but when the main characters escape they find themselves on the original "Earth", but this happens early on.
The Big Finish Doctor Who audio drama Terror Firma has the reveal that the setting of the story is a Dalek-conquered Earth.
The Roleplaying Game Earthdawn has a metagame aspect of this trope: the setting takes place A Long Time Ago on Earth, but there is no time travel, and the inhabitants naturally aren't affected by this. However, the clues were few (with only very small maps available), so most players actually never figured it out.
If by "very small" you mean "obviously shows Crimea, the Black Sea and the Caucasus" (e.g. a good chunk of southern Russia and Ukraine).
An alien version occurs in Iji, when the Komato are trying to find their home planet, Origin. It later turns out that Origin was the planet they just invaded, Earth...after they nearly made it uninhabitable with their Alpha Strike attack. Whoops.
City of Heroes has a weird version of this: much of the game's plot revolves around an alien invasion from a world in a parallel dimension. Which turns out to be an alternate version of Earth, where humans have been heavily modified into killing machines.
The ending of Illusion of Gaia reveals that the game took place on Earth all along, but just the the cause of evolution had been altered by Dark Gaia.
In Drakengard 's bonus ending, Caim and his dragon chase the queen beast into another dimension, but that dimension happens to be modern-day Tokyo. It's still an alien dimension to Caim, and this is illustrated by the fact that Tokyo is entirely in black and white.
The first Pikmin game suggests this, and the second one confirms it.
Just being on this page is a massive spoiler for the following game. Solatorobo.
Super Robot Wars UX: The game reveals that the moon contains a Tokyo from the previous universe.
This is reversed in Dawn of Time. At first it appears to take place in the past, with the addition of the cavegirl-alongside-dinosaurs Flintstones device. However, as more of the world is shown through the story it's revealed that there are large cities, more advanced technology, and trading routes, showing that the world is more of an alternate universe. It's just Dawn who's incredibly primitive and possibly not even human.
Double-subverted by Homestuck. On this page, we are shown the Cherub world, which has the Statue of Liberty (in crappy jpeg form, no less). The view then zooms out, revealing several identical Statues of Liberty, leading many readers to suspect that it isn't actually Earth. Then Andrew Hussie's Author Avatar tells Caliborn outright that the planet is Earth—specifically the Earth from the Alpha timeline, moved into the new universe by at-the-time unknown means. Hussie even lampshades the use of the Statue of Liberty:
Weren't all the Statues of Liberty a dead giveaway? If you see one or more shitty old Statues of Liberty on any post-apocalyptic wasteland planet, that automatically means it was Earth all along, as a rule. Then when you realize that, you're supposed to have a mental breakdown.
Lampshaded in Futurama: "The next day, Billy's planet was destroyed by aliens. Have you guessed the name of Billy's planet? It was Earth! Don't date robots!"
Then turned Up to Eleven in a season seven episode, where, 6,990 years into the future, humans, apes, birds, cows, and a slug-like race have all rose to power, destroyed themselves, and then subsequently conquered the weakened race.
And each one making it's own Statue of Liberty. Right next to the others.
In the Justice League episode "Hereafter" Superman wakes on a planet with a red sun after being blasted by Toyman and presumed dead. He makes his way across the wasteland to a jungle area, dealing with strange local creatures along the way. Considering the page I'm writing this on, you can guess what he learns when he meets up with his old 'friend' Vandal Savage.
In addition to the Homer quote above, The Simpsons episode "A Fish Called Selma" includes a musical stage version of Planet of the Apes called "Stop the Planet of the Apes, I Want to Get Off". The song that Troy McClure, as Taylor, performs during the final scene literally names the trope in its lyrics:
I hate every ape I see From chimpan-A to chimpan-Zee No, you'll never make a monkey out of me!
Oh my gosh! I was wrong! It was Earth All Along! You've finally made a monkey, (Yes, we finally made a monkey!) Yes, you've finally made a monkey Out of me! I love you, Dr. Zaius!
The punch-line of the first season of Transformers: Beast Wars was that it doubles as both a sequel and prequel to The Transformers: the primitive planet on which they found themselves was, indeed, Earth all along, millions of years in the past, and the entire series was set during the period of dormancy while the Autobots and Decepticons were unconscious in their crashed ships halfway through the first episode. However, all the characters were from long after the original series, winding up on prehistoric Earth due to time travel. There are some dead giveaways (Stonehenge was made by aliens!), but enough red herrings to make them look like they aren't dead giveaways. Speaking of red herrings, the second moon turns out to not be a moon at all.The Reveal is handled nicely, bringing the plot together for second and third seasons with episodes far more connected than those of the first.
Particularly well handled considering that Megatron believes it is Earth from the first episode, though Dinobot does not, given the two moons and lack of civilization. Audiences were given conflicting evidence to support either a primitive Earth or an Earth-look-alike until discs came into play.
Made even funnier by how they all call the planet Earth throughout the episode, and the title itself is "When pigs ruled the Earth"
It Was Our Homeworld All Along
Anime and Manga
In Mahou Sensei Negima!the magical world is in another dimension, but metaphysically tied into Mars. Remember how Chao said she was from Mars?
In the 2011 Episode of Bardock, Bardock somehow survives the destruction of the Planet Vegeta and lands on the Planet Plant whose peaceful inhabitants are being harassed by space pirates led by Lord Chilled. Absolutely no one was surprised when it turned out to be a primitive Planet Vegeta and Lord Chilled was the ancestor of Frieza. For extra bonus points, Bardock somehow became the first Super Saiyan and recursively started the legend that haunted Frieza! The Abridged version made Bardock being unable to figure out the fairly obvious twist a Running Gag!
Pandorum: The audience is led to believe the spaceship has been drifting in space, but it is revealed at the very end that they had crash landed on the destination planet hundreds of years ago. If they had ejected themselves and the rest of the passengers at the beginning, they would have been saved.
The Elseworld mini-series/graphic novel Red Son ends with a twist: Krypton is actually a far future Earth, a utopia created by Jor-L's famous ancestor Lex Luthor, who founded it after defeating the Comrade of Steel (see Temporal Paradox).
In The Pendragon Adventure's eighth book, The Pilgrims of Rayne, Ibara is revealed to be an island on Veelox a few miles off the shore of Rubic City. 300 years in the future. Upon visiting Rubic City, Bobby finds the place a ghost town, with the Lifelight Pyramids now being tombs, and the only humans around are crazed pirate-like scavengers. It's rather terrifying.
Isaac Asimov's The Stars Like Dust is a veritable cornucopia of Earth All Along. About half the chapters end with the reader's sudden discovery that the story's location is not what it seemed. Contains examples of "It Was Earth All Along", "It Was The Homeworld All Along", and "After The End".
An award-winning Star Trek short story called "Our Million-Year Mission" had an Uber-Enterprise (comprised completely of holograms from the galaxy's best minds, including the crews of all the Enterprises...and a very real Data; no one but him knows any of that until The Reveal, however) that finds a replica of the Milky Way galaxy devoid of life billions of light-years from where it should be. Only it's not a replica...it is the Milky Way, and all of its life-forms have ascended to a higher plane of existence, making it a sentient galaxy.
The 2000AD short story The Last Hurrah of the Platinum Horde, by Alan Moore, has a gang of space age barbarian warriors deciding to leave their home planet and set off in a straight line across the universe raping, pillaging and killing everything in their path. It turns out that the universe is curved, and they end up coming back to their homeworld from the opposite direction and inadvertently sacking it.
The early Arthur C. Clarke short story "Encounter in the Dawn" depicts First Contact between a technologically advanced galaxy-spanning empire and a primitive caveman tribe on a backwater planet. The description of the explorers is humans in the Standard Sci Fi Setting, however when the survey team is recalled, it is revealed that the cavemen they interacted with would eventually found the city of Babylon.
Done in the 1968 novel Captain Future novel "Planets in Peril" by Edmond Hamilton. The protagonist goes to help a human looking race in a dying universe (a short time away from being reborn in a new Big Bang), impersonating an ancient hero of that race. In the end, it is revealed that the universe is actually our own some 20 billion years in the future. What was the ancient hero's name? Kaffr!
Live Action Television
The twist ending to the fifth season premiere of Andromeda was that the dystopian Seefra-1 was really Tarn Vedra, the captain's home planet and former seat of the Commonwealth.
In the Hollow World inside Mystara, sections of doomed surface-world civilizations have been transplanted and preserved by the Immortals. Most such cultures traditionally believed that their patron Immortals actually rebuilt their native worlds to protect them, rather than re-located them en masse; however, the recent arrival of surface-world explorers and traders has proven to many that they'd been moved to the planet's interior.
Dragon Quest III (Dragon Warrior III in America) had the protagonist fall into the Dark World, where he must defeat the demonlord Zoma. After defeating him, the locals celebrate by giving him the title of Loto (or Erdrick, in American NES versions). This reveals that the "Dark World" is actually Alefgard, the kingdom the first game takes place in (which also appears in the second), and that III was a prequel (though anyone who played both games would likely come to this conclusion almost as soon as they arrived there, what with the almost identical geography and town names).
Zork Zero, prequel to the seminal Zork text adventures, makes its setting in the timeline fairly clear from the start. The twist comes at the end of the game, when you inadvertently transform the castle in the story into the little white house from the opening of the original game.
Jak II; upon discovering the ruins of Samos's house partway through the game, Jak says, "This horrible place... is our world!"
A Silver AgeSuperman story (which hasn't been in continuity for decades), "A Name Is Born", had two astronauts from other worlds land on prehistoric Krypton, fight, save each other's lives, and get stranded. Naturally, when they took off their helmets, one was male and the other was female — and they were named Kryp and Tonn.
In a popular MST3K episode, Women Of The Prehistoric Planet, the captain of the ship leaves his illegitimate daughter Linda behind on said planet with Nature Hero Tang, the son of the survivors of the ship they were trying to rescue. He accepts that they'll be happier together on their new world, then pronounces (in the cheesiest way possible), "The third planet will henceforth be known as... 'Earth'."
The Restaurant at the End of the Universe dumps Arthur on a ship transporting Golgafrinchans, Human Aliens who perform useless jobs towards a mass genocide. They land on a beautiful planet, settle it, and set about ruining it with their bureaucratic and stupid ways of performing basic tasks. Arthur realises that the Golgafrinchans were the ancestors of humans, not the ape-like beings native to Earth. However, the book ends with Arthur sitting by a stream, watching the trees burning on the horizon (the Golgafrinchans had adopted the leaf as their currency and were fighting inflation by reducing the supply), feeling glad to be alive.
Odin Sphere features the chipper, happy ending of almost every human being on Earth dying horribly. However, two people survive, who presumably go on to become that world's equivalent of Adam and Eve. The game proper ends, followed by the Framing Device (a little girl reading a storybook) complaining that it ended like that before noticing a coin on the cover very similar to one of the MacGuffins in the book. As she walks away, a character from the stories appears and takes the coin, implying that the de facto Adam and Eve actually are.
An interesting manga variant with an AnviliciousAesop, delivered by mangaka Rumiko Takahashi in the early 1970's. A time vortex opens up in a classroom and starving primitive peasants spill out. Clues lead the class to assume that these are time-travelers from a historical famine centuries in the past. Since the class had been discussing the world's declining resources, they give huge amounts of food to the starving peasants before sending them home. "Home" turns out to be thirty years in the future - evidently the people in the past would end up sending so much food through the time portal to help "the past" that they would end up collapsing civilization.
Scrapped Princess does this to the viewer, with a small hint that something might not be as it seems being at the beginning of the very first episode, and nothing more said about it until partway through the series. Everyone in the show is seen to be living in a catchall generic Middle Ages fantasy setting, and to the viewer, it looks like just another Slayersesque/Record of Lodoss War type anime based in some nondescript magic world that is kind of like our world, but not. However, the truth is that they're in the far future in "our" world, and their conquerers have regressed everyone back to the Middle Ages in order to prevent them from even wanting to mount a resistance. The "magic" seen in the series is actually Magic from Technology, based on the tech maintaining their "prison", which is actually a tiny piece of the world suspended in the sky. Then again, the very beginning of the show has a bit of Astronomic Zoom that reveals the setting to be Korea.
Sorcerer Hunters does the same thing Scrapped Princess did much less effectively (or more, considering that the above twist was an important part of the story in SP, but in SH, even if you suspected it somehow, it doesn't really matter until the end, and isn't even mentioned until the end). Long story short, in the final battle between Zaha and the Sorcerer Hunters, Zaha prepares a spell to unleash Carrot's power as the God of Destruction. Doing this requires them to be in the world that came before the world that the characters are now in, a world of death and destruction. The characters are transported to what looks to be present day New York City, destroyed by some kind of apocalypse or war. Also, flashbacks of the characters are shown living their present day lives as the actions of the present and future converge. While this sounds kind of cool, trust me it's stupider than it sounds.
∀ Gundam has a variation. The series takes place in a pre-industrial world, which makes it rather shocking when mobile suits show up from the Moon. Partway into the series, it's hinted that some disaster (dubbed the Dark History) is the reason Earth is backwards while the Moon is advanced. The final act of the series is kicked off when we finally see what the Dark History was: all of the Gundam universes made prior to Turn A, including those not helmed by creator Yoshiyuki Tomino, who later said that the series was meant to put all of Gundam into a single timeline (hence the name, "Turn A", from the mathematical symbol meaning "all items in a set").
In the alternate-reality Superman comic Red Son, it is revealed that Superman is the distant descendant of Lex Luthor sent back in time, and Krypton is actually Earth, destroyed by the death of the Sun.
A non-canonical comic based on Star Wars has the Millennium Falcon crash on a distant planet; Han is killed by the natives. Years later, the Falcon's wreck and Han's corpse are discovered by the famous archeologist... Indiana Jones. Who was trying to discover the Sasquatch, previously known as Chewbacca.
Although the film's American title title kind of gives it away. The original Italian version is titled Il mondo di Yor (The World of Yor), which makes the final act much more of a twist.
Stephen Vincent Benét's short story By the Waters of Babylon (1937) is this trope: the narrator, the son of a priest who is "immune" to a certain kind of metal that can kill everyone else in his tribe, narrates in such a way that you think he is a member of a primitive tribe that may or may not possess magic of some kind. By the end it is clear that while there may be magic involved (specifically the flashback sequence), they most definitely are in the future, close to New York. The holy metal spoken of is most likely radioactive, and the narrator, like his father, has inherited his radioactive immunity. The "Babylon" in the title is a Shout-Out to the town of that name on Long Island.
The world of The Runestaff by Michael Moorcock, is Earth in a distant future, where all technology is lost.
In Alfred Bester's short story Adam and No Eve, an experimental space flight sets off a chain reaction that devastates and sterilized the world, leaving the pilot of the spaceship as the last survivor. The story ends with the reveal that the planet will be reoccupied by life evolved from the pilot's gut microbes, and that present-day Earth is the result.
A Time Team story from 3-2-1 Contact appears to be set in the distant past, but at the end bulldozers show up the Time Team realizes that they are actually in the present, in the middle of the Brazilian rain forest.
The final book of The Dark Angel Trilogy revealed that the setting, a fantastical alien world with month-long days, was Luna, terraformed ages ago. Earth's was incinerated in a global nuclear holocaust, and Luna had a civilization collapse to medieval fantasy levels.
The early Piers Anthony trilogy Battle Circle is set in a post-Apocalyptic world with various cultures ("nomads" and "crazies") living in the ruins.
A variation occurs in The Atrocity Archive, in which a portal to another universe leads to a frozen, atmosphere-less planet with a sky of red stars. While the protagonists naturally assume this is some alien world, it turns out it's what's left of an alternate Earth in which the Nazis summoned an Eldritch Abomination. It's nearly done eating that universe, and it's looking for a fresh buffet...
Live Action TV
Land of the Lost: Not Earth, but a similar situation; an advanced, civilized Sleestak arrives in the Land of the Lost by Time Travel, only to discover that the primitive Sleestaks aren't from his past, they're from his future, After the End.
The planet Omega-IV in the Star Trek: The Original Series episode "The Omega Glory" is a bizarre case. The "Yang" and the "Kohm" tribes are all that's left of their civilization after a Cold War turned nuclear, and the resemblance to Earth comes to a head when the tattered, ancient American flag and U.S. Constitution put in appearances that leave the heroes stunned. But it's all the setup for a massive unreveal. While a deleted scene would have suggested that the inhabitants are the human descendants of a Lost Colony, the mysteries are never resolved onscreen and Omega-IV is apparently just an alien planet that coincidentally reinvented America, the Soviet Union, China and the Cold War. (There were at least two other worlds in Original Trek that had cultures identical to Earth —five, if you count the Space Nazis who were explicitly given that information by an Earthman, the Space Gangsters who got it from an Earth book, and the Space Indians whose ancestors were actually from Earth.)
Hammer House of Horror episode "The House That Bled to Death" is about a woman being haunted by visions of brutal murders she believed had happened in the house where she lives. At the end she leaves the house, but it is revealed that the visions were of the future.
In the 2000s Battlestar Galactica... Well, it's complicated, but manages to touch pretty much all the versions of this trope:
The ending of the first episode, when they revealed that the lost 13th colony that they were going to search for was called "Earth."
After the End: When they finally reach Earth, it's a desolate wasteland, devastated thousands of years earlier by a war between human-form Cylons and the Centurions they'd built
It Was Our Homeworld All Along: The "final five" Cylons turn out to be the last survivors of Earth, which makes the long-sought thirteenth colony their homeworld
It (Wasn't) Earth All Along: The thirteenth colony was called Earth, but wasn't our home planet: our Earth is named after the earlier planet
Before The Beginning: The human and Cylon survivors decide to go native on a primitive but hospitable planet, which they decide to name "Earth" because after four years looking for a planet called Earth, they'll be damned if they're gonna settle. When we revisit the fate of this Earth 150,000 years later, we see New York City and a man reading National Geographic — as it turns out, the story is before our modern age, and we are all human-Cylon hybrids. BSG gets those double points mentioned at the top of the page, because of the Adama family name.
In Brewster Rockit Space Guy, the titular character is on a visit to the planet Troglodonia, home of the Space Cavemen. One cave has a mural on its wall that depicts a visual history. It starts with a caveman, progresses through history (a gladiator, a car, etc.) before concluding with a mushroom cloud and another caveman.
Space-Caveman: Maybe planet older than we thought.
Etrian Odyssey has a fairly typical medieval fantasy swords-and-sorcery setting, with some cryptic intro on the title screen about some disaster long ago that ended the previous age. This is shattered when you reach the fifth stratum in the first game, Lost Shinjuku (as in, this Shinjuku, with the backgrounds looking almost exactly like those pictures and everything.) It turns out that recklessly advancing science and technology brought about global warming and miscellaneous environmental calamities to the point that Earth was an uninhabitable wasteland, killing off almost everyone. The few survivors started something called the Yggdrasil Project to try to restore the environment, eventually leading to the low-population, completely lush greenery-everywhere medieval fantasy-looking world you're used to.
Quintet's Heaven And Earth series, which involves Soul Blazer, Illusion of Gaia, and Terranigma. Although the first of those games doesn't explicitly claim to occur on Earth, it's a direct prequel to Illusion of Gaia, which does (the ending reveals that Will's world eventually gave rise to modern civilization.) Terranigma is set long After the End, but the player isn't clued into this until after the end of the first act.
Of course, this all depends on you interpretation of the series. Fan theories give rise to every possible scenario from alternate dimensions, Time Travel, to some sort of bizarre "New Game+"-inspired theory that claims that the efforts of all three games lead to "our Earth".
Indie-game Oracle Of Tao has this lampshaded from the very beginning of the game, along with a second world due to World Sundering. The Playable Epilogue omits the extra section, since the gate to this other world was presumably sealed.
Most of the plot in Sigma Star Saga revolves around searching for a series of six planets which will ultimately lead to a Doomsday Device. Earth is the "seventh" planet, which had already been destroyed by said device.
Squaresoft loved to hint at this trope during their later SNES to early Playstation years. Secret of Mana has a scene late in the game when the heroes find recordings of their world from its And Man Grew Proud days, before the Mana Beast destroyed civilization and brought about the return of magic. The recordings include country music, an episode of Jeopardy, news channel debates on the dangers of mana energy, and then a final broadcast of the Mana Beast attacking a city and then turning on the news crew that's filming the destruction. The implication is that the world of Secret of Mana is really Earth's distant future.
Then in Final Fantasy VII, we have an archeological dig that's uncovered what appears the ancient remains of a recognizable, real-world fighter jet. Fans debated the implications of that scene for years, though after the release of Final Fantasy X-2, Word of God has half-jokingly said that, rather than our world, the game actually takes place in Spira's far future.
And in Xenogears, the heroes find an underground city near the end of the game that looks like a modern metropolis and, within it, they find ancient newspapers making references to everything from Elvis Presley to the Wimbledon Cup (not to mention that the origins of the Ancient Conspiracy fueling the game's story bears a What Do You Mean, It's Not Symbolic? resemblance to the book of Genesis). Word of God later stepped in again to say that it's not Earth, but another planet far in Earth's future (though Earth does play an important, if unseen, role in that planet's backstory).
Not only that, but the game gives a more subtle hint that it might be our world: The chronology. The game takes place ten thousand years after the first humans began populating the planet. If one assumes Zeboim is modern or near-future Earth (given the technology it is clearly supposed to resemble it), and Zeboim died out 4000 years before the events of the game, then the game would take place circa 6,000 A.D., and the world's genesis story would have taken place circa 4,000 B.C, which is pretty much (23 Oct, 4,004 B.C.) when Bishop James Ussher calculated to be the date God got rolling on creating the world. Word of God may say it's not our world and of course that makes it true, but there are so many coincidences!
Using the Perfect Works chronology, Xenogears actually takes place in A.D. 17276-17277.
At the end of Scrapland the titular Scrapland is revealed to be the Earth during the Big Bad's As You Know speech.
The Konami arcade game Gaiapolis starts out looking like an alternate reality but reveals itself pretty late in the game to be an After the End. The Reveal location? A massive graveyard watched over by mysterious robots.
Utawarerumonois set at a time where the descendants of genetic experiments made during an apocalyptic period have repopulated Earth. This is a variation where you are led to believe that it is an alternate fantasy world.
A pretty big clue comes when you see a strategic map view of the area and the area around it is identical to the west coast of Japan, as seen from the east.
After defeating the God King in Infinity Blade and sitting through the credits, the Warrior accidentally triggers a holographic map of the world and its literally shattered moon. At first, the landmasses aren't instantly recognizable, but after a while Australia, Eurasia, and Africa rotate into view.
Solatorobo is set in a Steampunk universe featuring Petting Zoo People who live on floating islands in the sky. Half way through the game however Human looking characters from the ancient world begin to show up. Eventually after traveling to (what's left of) the surface it's revealed that the game is set on far future Earth after Humanity went extinct in World War III. The Petting Zoo People and Floating Islands are the result of sentient supercomputers trying to reset life on the planet.
Lunar: Silver Star Story seems to keep this aspect in the background and players barely notice it as the issue never comes up in the story proper. The planet Lunar is actually the moon of the Blue Star, the celestial object that is seen in the sky. According to legend, the Blue Star is where the Goddess Althena transplanted Lunar's residents from. It is mentioned that Lunar had to be terraformed by Althena. It doesn't take much to notice that the Blue Star is not a star but a blue planet. The most visible continents on the planet resemble Africa and Europe. Alex and the adventurers do visit the Frontier which appears as Lunar did pre-terraforming, which looks like the surface of the Moon.
Subtly hinted at in Adventure Time. The Land of Ooo appears to be a crazy fantasy world, but the opening credits and occasional references (along with Word of God) implies that it's actually After the End. How all that magic suddenly started working is still anyone's guess.
Confirmed in the Season 5 Premiere. A nuclear war caused mutagenic particles to spread, mutating all of the objects on Earth, and nearly driving humans to extinction. We also get to see an alternate timeline when the Mushroom Bomb was never detonated, and it appears to be mostly normal.
Parodied in the Futurama episode "The Cryonic Woman", where Fry thinks that he is in New New YorkAfter the End, but it turns out to be current-time Los Angeles. Fry protests: "But there was this gang of 10-year olds with guns! But everyone is driving around in cars shooting at each other! But the air's green and there's no sign of civilisation whatsoever!" and his friends reply: "That's L. A. for you!"
It then descends into satirical social commentary, where Fry cites, as proof that he's in a post-apocalyptic wasteland, the facts that nobody reads, everyone's a phony, and all the food has cilantro in it.
Parodied again in "The Late Philip J. Fry", when Fry finds the ruined Statue of Liberty next to an Ape Statue of Liberty, a Bird Statue of Liberty, a Cow Statue of Liberty and a Slug Statue of Liberty.
Parodied in Reboot. In one game, the landscape is that of a desolate wasteland. A single 1-binome walks onto the screen and utters the phrase, "You finally really did it. You maniacs! You BLEW IT UP!"
In the Creepypasta"Mutant Future", it turns out that the Pokémon world is actually Earth in the future. In the year 2033, a disaster from a matter-energy transference experiment in Japan causes the annihilation of Japan and the mutation of Japan's wildlife. The once normal wildlife mutate into Pokémon. While the nation of Japan ceases to exist due to its destruction, anarchy, and war, decades after the catastrophe the area becomes the Kanto, Johto, Hoenn, and Sinnoh regions, populated by the mutated wildlife/Pokémon.