Tenho certeza que esta é a história de JG Ballard "The Concentration City", originalmente publicada como "Build-Up".
Em Wikipédia :
"The Concentration City" is set in a "city" encompassing everything in known existence to its inhabitants. The districts comprise endless streets and buildings and seemingly infinitely high and low levels, or floors, with few trees and little wildlife. Cubic space is in shortage and expensive. High speed transportation is in use, but it is implied that many people do not find the need to leave their particular area. The people do not know what lies beyond the endless urban expansion, but seem to care little, and generally assume that there are just endless levels and districts that have existed forever.
The short story follows a physics student named Franz, who devotes his time to the concept of "free space"—the idea that somewhere there must be just infinite amounts of space, a concept labelled as nonsensical by most of the other inhabitants of the city. He also wishes to develop a machine for flight—a relatively unknown theory due to the complete lack of partially open spaces.
Eventually Franz decides to travel on one of the high-speed rail coaches for as long as possible in one direction in order to discover what lies beyond the urban zoning and trying to find free space. The story ends when Franz, after ten days of travelling, realizes that the coach is travelling back in the opposite direction. When he is finally stopped by the authorities he notices the date of a calendar is unchanged from when he set forth travelling. Franz discovers that if one keeps travelling forward, one finally ends back in the same place at the same time.