I seem to understand that the need to escape a global disaster is the distinguishing element, not the voluntary alternatives like, say, the urge to visit the future (through prolonged artificial sleep, cryonics or stasis) or the attempt at colonizing a distant planet (through generation ships), that also put humans in a confined space and would very likely lead them to lose civilization.
Hence I'd say one of the earliest instances of characters emerging from a bunker, if not the earliest, is "Tumithak of the Corridors" by Charles R. Tanner, published in Amazing Stories of January 1932.
You can read the full story here.
There are four connected stories about Tumithak, the last of which was unpublished until 2005.
In this series, humans sheltered underground to escape an alien invasion from Venus (the spider-like shelks) and now, thousands of years later, they are accustomed to living underground in complexes that look like huge nuclear bunkers, as people living in the 30s (that is, before the Bomb was a thing) might have imagined such installations.
Early on, the protagonist finds a book written some two thousand years ago explaining how the invasion happened and where humanity escaped:
Ever, as men found themselves defeated by the shelks, they drove deeper and deeper into the earth, their wonderful disintegrations dissolving the rock almost as fast as man could walk through the corridor it dug. Men were forced from the surface at last, and a million intricate warrens of corridors and passages honeycombed the earth for miles beneath the surface. It was impossible for the shelks to ever thread the mazes of the innumerable labyrinths, and so man reached a position of comparative safety.
"And thus came the deadlock.
"The Surface had become the property of the savage shelks, while far below them in the pits and corridors, man labored to hold on to the dregs of civilization that were left him. An unequal game it was, for man was sadly handicapped--the supplies of elements that produced the disintegrating rays gradually diminished, and there was no way of renewing them; they were unable to secure wood, or the thousand and one varieties of vegetation on which their industries were based; the men of one set of corridors had no way of communicating with the men of another; and always came hordes of shelks, down into the corridors, hunting men for sport!
"The only thing that enabled them to live at all was the wonderful ability to create synthetic foods out of the very rock itself.
These shelters are clusters of corridors and hallways with rooms and apartments opening on both sides - several of them abandoned - where people live, with the addition of communal rooms and the so called “food-rooms”, were synthetic food is processed from rocks.
As far as eye could see the long somber corridor extended. Fifteen feet high and as many wide it ran on and on, its brown, glassy walls presenting an unvarying sameness. At intervals along the center line of the ceiling large glowing lights appeared, flat plates of cool white luminescence that had shone without attention for centuries. At intervals equally frequent, were deep-cut doors, draped with a rough burlap-like cloth, their sills worn down by the passing generations of feet. Nowhere was the monotony of the scene broken unless it were in some places, where the corridor was crossed by another of equal simplicity.
From somewhere far below this corridor came the steady beat and throb of some gigantic machine; a beat that continued unceasingly and was so much a part of the life of these people that it was only with difficulty that they could be brought to notice it at all. Yes its beat bore down on them, penetrated their minds, and, with its steady rhythm, affected all that they did.
Now, countless generations later, humans live in isolated communities like primitives (some more, some less) in their corridors, since all their knowledge has been lost for centuries: they have lost knowledge of the world above as well, since they never leave the deep corridors.
Even the thought of going near the surface scares them, as the shelks live above ground in their towers ever since the invasion and hunt (even feed on) humans whenever they want.
"So it was that man's civilization, fought for and won after centuries of struggle, collapsed in a dozen years; and over it was imposed the Terror. Men, like rabbits, lived a life of fear and trembling in their underground holes, daring less each year, as time went by, and spending all their time and energy in devising means to sink their pits deeper and deeper into the ground. Today it seems that man's subjugation is complete. For over a hundred years, no man has dared to think of revolt against the shelks, any more than a rat would think of revolt against man. Unable to form a unified government, unable even to communicate with his brethren in the neighboring corridors, man has come to accept, far too willingly, his place as merely the highest of the lower animals.
Tumithak is the first human to reach the surface and even kill a shelk: needless to say, his actions in the first story will have consequences and, in the next stories, will lead humans to rebel and regain control of the ground.
By the way, the surface of the Earth isn’t a post-apocalyptic world in today's sense (a barren wasteland) but still was abandoned after a catastrophe hit humanity and was no longer suitable for living.