Isn’t earthquake a noun and the preceding word an adjective? Isn’t “Japanese” the adjectival form of “Japan”?
I'm not sure there is necessarily a rule for this type of situation - that is, when to use the name of the country and when to use the adjectival form. I think in many cases it's decided almost unconsciously based on what rolls off the tongue the easiest. The 'n' at the end of 'Japan' flows nicely into the vowel at the start of 'earthquake'. On the other hand, if an earthquake occurred in India it would feel odd to say "the India earthquake" - we may be more inclined to say "the Indian earthquake". English is riddled with these kinds of inconsistencies as we all know.
I think that it is referring to a place rather than being of a type or nationality.
If the earthquake was in America it could be an earthquake in America.
It's not possible to say America earthquake because there's 2 vowels so putting the country after the noun works well.
Of course that is if emphasis or beauty of the title is not taken into account.
The decision to use one rather than the other is not rational.
I think we would also say "Haiti earthquake" as opposed to "Haitian earthquake." It is the place, not the people, which is addressed, and therefore does not use the adjective form for the people. English is one of those rare languages with multiple adjective forms. Consider, for example, the difference between "butter fingers" and "buttered popcorn." Or perhaps, "China town" versus "Chinese restaurant." We use the noun form for one meaning, and the adjective form for another.
In this case, the place is significant. If the earthquake happened in Spain, it would the Spain earthquake, not the Spanish earthquake, nor the Spaniard earthquake.
Now I've only rarely heard it called "The Japan Earthquake", but I'd imagine that it would be used in the same way as:
The California Gold Rush
The San Francisco Earthquake
"Japanese Earthquake" would mean that there is something inherently different (and specifically Japanese) about this earthquake compared to others.
Like the above examples, I'd imagine that it would just be called the "Japan Earthquake" because that's where it was.