Except Beijing and Riyadh are pronounced essentially properly in English.
北京市 sounds like "Bay-zyuh-ing" (which we pronounce with no problem, despite the odd non-phonetic spelling derived from Pinyin) and الرياض is Anglicized as "ar-Riyāḍ", and since "ar-" is just a form of Arabic's definite article (the name means "the gardens") we just drop it and refer to the city as "Riyāḍ", which is exactly how we say and it almost exactly how we spell it.
The Mexico situation is more akin to the Turin / Torino situation. Many English speakers will know the famed Shroud of Turin, while the actual Italian name of the city is Torino.
A lot of Italian names get Anglicized like this, come to think of it. Venezia becomes Venice, Roma becomes Rome, Milano becomes Milan, Genova becomes Genoa, Firenze becomes Florence, Napoli becomes Naples, et cetera. And perhaps most famous of all, when the fair city of Bologna lent its name to their regional sausage, we ended up corrupting it into "Baloney"!
Spain has a similar problem. "Toh-lee-doh" versus "Toh-lay-doh", "Seh-vill-uh" versus "Seh-vee-yah"... perhaps even Toh-may-toh versus Toh-mah-toh?
I wonder if there's some unifying cause? England historically had a lot of trade with Spain and Italy, spanning many centuries and typically occuring through the medium of sailors, who certainly weren't the best educated or well spoken folks around.
In contrast, Beijing and Riyadh were far distant places, far less easily visited, far less frequently, far later historically, and typically by far more educated and erudite travelers. This might explain why their pronunciations were not corrupted, as was the case in the Mediterranean.
(To be fair, Beijing was for a long time known as Peking, but that was the accepted local "Southern Pronunciation" that Europeans experienced in Chinese ports cities far to the South of the capital city.)