Modern buildings like hotels are built to withstand earthquakes of some magnitudes. Wouldn't count on that at a local construction site or a worn down house you might pass on the street.
That "worn down house" might be good until "upper 6". Beyond that it all depends on when it was built and the associated construction standards at the time.
Sure, in the middle of a magnitude 9 earthquake I'd rather be in the middle of a suburban golf course (as long as it is far from any coastal tsunami) than any building, but I don't spend the majority of my time outside.
Two issues:
1. If you're making this choice during an earthquake, "outside" is often not a grassy field but rather the fall zone for debris from whatever building you're exiting.
2. If the earthquake is big/strong enough that you're in any real danger of building level issues, the shaking will be strong enough that if you try to run for the outside you're very likely to just fall and injure yourself.
Japan has had earthquakes forever. Their building regulations mandate things like isolation and dampers.
It all stems from an earthquake in 1923 in Yokohama which killed 140,000. Since then Japan's has over time developed some of the strictest seismic standards.
The main two ways people get injured in earthquakes (at least in Japan) are a) gas fires b) things falling on them. And being outside but near buildings is a good way for things to fall off those buildings onto you.