You may find yourself living in a shotgun shack And you may find yourself in another part of the world And you may find yourself behind the wheel of a large automobile You may find yourself in a beautiful house, with a beautiful wife You may ask yourself, "Well, how did I get here?"
Haibane Renmei: the precise nature of the town of Glie is left mysterious throughout, and although there is a way for the Haibane to leave, it's never clear where they go or how, leading to speculation among fans that Glie is an allegory for Purgatory, or that it IS Purgatory.
Fleep, possibly the ultimate Ontological Mystery; one person, in a phone booth, sealed in concrete.
Final Crisis Aftermath: Escape has a number of characters from The DCU's espionage community trapped in a dreamlike "Electric City" with no idea how they got there.
The first Saw movie. In later movies it is already established who is behind all of it, although the Ontological Mystery still applies to specific (groups of) characters.
Mindhunters has definite shades of this. The characters do know why they're on a secluded island: as part of an FBI profiler training exercise. It doesn't take long before they're completely cut of from the outside world and it turns out that there's a killer amongst them who starts murdering them one by one.
Memento has the protagonist (and the viewer) in a constant state of ontological mystery due to his ongoing amnesia.
Exam has the characters at a job interview in which they are presented with a 'test' that turns out to be a blank sheet of paper. They have to work out what the problem is then solve it, and they're all rivals for a highly sought after job. If any of them leave the room, they lose the chance. It gets LOTS worse...
Nine Dead. The protagonists all wake up in a cell chained to a wall. Their captor tells them that one of them will die every ten minutes unless they can tell him why they are there.
Captivity, a 2007 thriller film starring Elisha Cuthbert.
Literature
:
In the H.P. Lovecraft short-story "The Outsider" a man has lived his whole life in a dark castle beneath an all-enclosing forest that blocks out the sky. Yet, he feels strangely that he has not always been there...
In William Sleator's House of Stairs, five teenagers wake up in the titular House of Stairs. It's a giant complex of interlocking stairs and platforms, but none of the stairs lead out, they only connect to other parts of the maze.
Issola: A couple of people our hero considered completely indestructible have gone missing. Not even Sethra Lavode, who very much deserves her Shrouded in Myth status, can find them by herself. She, does, however, know how to get Vlad there, and he arrives to find his two incredibly Bad Ass friends stuck in apparently unbreakable, seamless chains in an empty room with no exits that appears to be on another planet. The plot hinges on figuring out how the hell the bad guys managed it, and why.
Minotavr (Minotaur), a Russian novel.
The Helmet of Horror by Victor Pelevin. Several people wake up in rooms connected only by a chat-like computer system; each room opens into some sort of labyrinth. Some labyrinths are real, some metaphorical, and one is accessible only through dreams.
In the Dungeon series, beings from all times and spaces are brought to a nine-leveled artificial prison called the Dungeon. At no point in the series is the Dungeon's origins, masters or purpose made clear, only speculated on.
Ilium by Dan Simmons comes close, even though it spans three planets rather than a room. The mystery is just what has happened between our time and this imaginary far future to make the latter so bizarre. For a start, where did all those Greek gods using advanced technology and living on Mars come from? The characters on Earth in particular take their condition as a mystery to be solved and try to escape the definite confines that are set upon them even as they are able to teleport around the world freely.
The Trial by Franz Kafka
Someone must have been telling lies about Joseph K., he knew he had done nothing wrong but, one morning, he was arrested.
And he never does find out what he's supposed to have done, either.
The Maze Runner has the main protagonists trapped in a maze. The sequel, The Scorch Trials, is about them trapped in the deserts of a future Earth.
Live-Action TV
Both Buffy and Angel did this in one episode each: "Tabula Rasa" for Buffy and "Spin The Bottle" for Angel. In both cases, a spell intended to affect memories went wrong and resulted in the entire main cast losing their memories. In "Tabula Rasa", they got complete Identity Amnesia. In "Spin The Bottle", they got Identity Amnesia removing all memories since their teenage years, which still complicated things because they each spent their teenage years very differently. Especially the 200-year-old vampire. In both cases, there were many logical but amusingly wrong deductions made about what was going on before they managed to undo the spell.
Part of the premise of BIONICLE. Although the characters themselves don't ask questions relating to how they, a bunch of sentient cyborgs, came to be living a primitive lifestyle on a tropical island , Word Of God has stated that this was a major source of the series' appeal in the early years, as the viewer would be curious as to how this situation came about. The Matoran were unaware that they were suffering from mass amnesia, so they were just as surprised as the viewers were when their origins were slowly revealed over the next few years of storyline.
Videogames
An entire genre of web games, the "escape-the-room game", is based on this, with the player being trapped in a room and having to search the whole place for items in order to get out. It typically starts with some Easy Amnesia to explain why the player doesn't know how they got into the room. Examples include Crimson Room and its sequel Viridian Room, and Mystery Of Time And Space.
Countdown by Access Software (released in around 1991) opens with the protagonist waking up in a mental asylum without memory
Myst is probably one of the most famous examples of this. Interestingly, the rest of the series avoids the trope except for End of Ages.
Only because you know where (if not who) you are from the first game.
Planescape: Torment can be seen as an example of what happens when someone makes a 50+ hour epic out of this trope.
The Neverhood begins with our hero Klaymen trapped in a room (see above) with no information, and goes from there.
eXperience112 (The Experiment in America), the player is trapped in a control room with no memory how he got there. Notable in that you do not leave the room - you use its controls to manipulate another character into solving puzzles for you.
In Eternal Sonata, Frederick Chopin views all of the events that transpire in the game as nothing more than a dying dream. Finding out whether or not that's true is a major element to the story.
the white chamber: You wake up in a coffin on a space station. You can leave, but you'll die of asphyxiation.
Theresia for the DS fits this perfectly, with the main character slowly regaining her memories throughout the game, and the house is filled with deadly traps.
Silent Hill 4: The Room - the only chapter in the series in which the protagonist didn't willingly enter.
This style is one of the oldest computer games: Adventure, originally copyright 1973; Adventures in 4 dimensions, originally copyright 1979, updated in the early 90's; and The Count which was originally written for the TRS-80, which was only sold from 1977 to 1981.
The beginning of The Legend of Zelda: Majora's Mask certainly qualifies. Link is sent into a parallel world after being transformed into a Deku Shrub and finds himself in the middle of a strange town, unable to escape because there are guards in every exit blocking his path. He needs to find out exactly where he is, what is going on and how to return to normal in three in-game days' time before the world ends. Afterwards, the game starts to play like a regular Legend of Zelda game.
The goal in Rule of Rose is to learn of Jennifer's past and come in terms with it, making it a straight example of this trope.
Nine Hours, Nine Persons, Nine Doors: You wake up in an early 20th century 3rd class cabin, in a flooding ship, actually, a recreation of a flooding ship, and must escape in under 9 hours when the floodgates reopen and the ship does its submarine impression.
Submachine, a point-and-click adventure series has, since 2005, captivated audiences with its infinite layers of complexities and strange dimention-warping room-escape-esque games.
Even when in a literally infinite open space, you still cannot escape.
In ATLUS' game Catherine every one of the sheep in the Nightmare World start off completely oblivious, including Vincent. Many conversations on the landings involve trying to discover who the rumored witch is, why they are there, and whether or not there even is an exit. The only sure exit from these nightmares is death. The trials themselves are highly symbolic of maturity, dealing with Vincent's unwillingness to take responsibility.
The Ends has as a central plot element the question of whether the inhabitants really exist or are simply living out a self-inflicted hell created when they blew themselves up in a nuclear apocalypse.
Blank It takes place entirely in this scenario, with the two main characters appearing unexplainably in a blank white void.
Problem Sleuth starts off in a rather simple locked room version of this, but rapidly grows to encompass an imaginary universe, demonic mafia kingpins and a army of courtesan angels. In the end however, the main character goal is to escape the office building they start off mysteriously trapped in and reach the streets of the real world.
Homestuck: A young boy starts a multiplayer video game and finds himself and his house are suddenly Trapped in Another World, while back on Earth meteors are destroying civilisation. That's only the beginning, however...
The base plot of many a multifandomroleplay, often nicknamed 'spooky jamjar games'. The setting is a 'spooky jamjar'.
The blog Ontological (part of The Fear Mythos) begins when the main character wakes up in a house without doors...instead all the windows and places where the doors should be are bricked up and he is unable to escape.
Western Animation
Twelve Ounce Mouse (Possibly... who really knows what that show is about?!?)
As near as can be said with any certainty, the character Mouse himself almost definitely realizes he is one personally when memories of appears to be a wife and family prompt him to reflect that he really doesn't remember anything from his own past much before the series.
In My Life as a Teenage Robot, the "Enclosure of Doom" episode starts with Jenny and Killgore regaining consciousness inside a high-tech structure, complete with Death Course, with no idea how they got there. It turns out they're trapped inside Armagedroid, Killgore's Humongous Mecha.
The plot of the 2007 The Simpsons episode "Eternal Moonshine of the Simpson Mind". Homer spends the episode trying to regain his memories of the previous night. Invoked Trope because Homer accidentally learned about a surprise party the town was holding for him, and asked Moe to concoct a Gargle Blaster that would un-spoil the surprise for him.