I got into this problem at the E4's Pokemon Center, I'll just post it here in case anyone else gets the same problem. I'm not sure if anyone's already posted this but here goes:
When you enter the Union Room and then exit it, after restarting, your game will for some reason save outside the Pokemon League building instead of the Union Room on the second floor. And then from now on, if you enter any of the second floors on any of the Pokemon Centers, you will find that it will automatically walk you off the actual Pokemon center floor into the black area underneath. Like this:
Clicky
This is how to fix it. (
Found on this Nintendo page)
"If your character becomes stuck in the wall in the 2F of the Pokemon Center, try the following:
When this happens, without saving, turn off the power.
You will restart the game at the last place you saved.
If you return to the second floor and it happens again, take the following steps:
After returning to the last place you saved, without going to the
second floor of the Pokemon Center, please stand in front of the
Contest Meeting Hall (コンテスト会場) in the northern
part of Yosuga City (ヨスガシティ)
Enter the Contest Meeting Hall, and talk to the female receptionist
character, the first one on the left. Then, when you hear news of
the Super Contest (スーパーコンテスト), select "Quit" (やめる).
When you do the above procedure, it should stop the
wall glitch on the 2F of the Pokemon Center from occurring."
I think this glitch also work similarly to the E4 glitch, you can explore the black area and get to different places.