I am not a pro of this generation's mapping, but I'd say no.
The game has what is called a "centerpiece", and it loads data according to said centerpiece.
Example : when you are in Jubilife City, you current map is Jubilife City (obviously) but your centerpiece is Sinnoh, because Jubilife is just part of Sinnoh.
This means that every location in Sinnoh is in one gigantic map ; however, interiors each have their centerpiece, meaning that they are completely independent from the rest.
You could say, "well, the maps have to be stored in ROM, so by sufficient walking, I could go to any map !"
Again, this is not based on solid evidence, but what I am going to say has chances to be true.
Remember the DS has a filesystem (like the GB's ROM banks) that you may have to switch between to load maps ; and also, the maps the game usually use are copied from ROM to RAM. So that means you should walk from the RAM all the way
to the ROM. Good luck in doing this
Last thing : during your walk, you would certainly encounter data interpreted by the game as collision, and while in RAM I guess you have ways to be trapped. And maybe that some portions of the ROM would simply be non-accessible because of their layout.
tl;dr : sadly no, it's not like earthbound.