Eventually it got to the point where only the underclasses lived on the bottom of the Earth and they would get stuck doing all the dirty work and whatnot. Meanwhile, hundreds of stories off the ground, the "elite" would live in super-luxury and they would spend their entire lifetimes living in the upper reaches of the skyscrapers - all connected by magnetic trains that would take you from city to city on tracks that were thousands of feet off the ground.
Anyway, the storyline is that some of these privileged people decided to band together and "explore" the lower levels of their skyscraper city. You see, most of these people have never been beneath say the 500th floor level, and they saw themselves as adventurers with a goal to reach the actual ground level of Earth (which existed only in their imaginations). The ordeal these people went through to reach the ground was pretty incredible. They had to evade security patrols and roving gangs of thugs and as they descended to the lower levels, well, things got more and more dangerous for them.
Eventually they made it to the bottom (some of them were killed or were captured along the way) and they had to go through some really bizarre stuff to get to the outside world. But when they finally were able to put their feet on the actual earth and see flowers, trees and bugs for the first time, it was like they journeyed to a totally different planet.
Really cool story. I read it as a library book when I was about 12 and was never able to find that story again. Have no idea who wrote it or even what the title was.
I want to say it was Robert Silverberg.
Not sure though.
I know this isn't the one but I remember reading a science fiction story that talked about how Earth got overcrowded and the only solution was to keep building taller and taller skyscrapers.
The novel was by Robert Silverberg. I forget the title. People in the arcologies reproduced freely. People in the agricultural lands that fed the arcologies had not-nice ways of limiting population (IRRC, YMMV).
The story you just described was made into an episode of Star Trek.
There’s some history about the story development at this site -
http://www.imdb.com/title/tt0708456/
The original story was written by KGF Vissers.
This is NOT set on Earth but on a newly settled and basically empty planet. Travel between the stars apparently takes many years as they don't expect to be contacted again for several decades at the earliest.
Garde la Foi, mes amis! Nous nous sommes les sauveurs de la République! Maintenant et Toujours!
(Keep the Faith, my friends! We are the saviors of the Republic! Now and Forever!)
LonePalm, le Républicain du verre cassé (The Broken Glass Republican)