Country adjectives and language names: how do we decide to add -ese, -ian, etc?

What governs the endings we put on country adjectives and language names?

Japan -> Japanese, Malta -> Maltese, France -> French, Belgium -> Belgian, Spain -> Spanich, etc? If we say Japan and Japanese, why don’t we say Iran and Iranese? England -> English, but Iceland -> Icelandic. In English we say Canadian, but in Italian it’s Canadese.

What’s the rule here?

There is no rule.