The other answers are correct about the general reference - there are numerous examples in real Earth history of disastrous land wars in Asia. But what the other answers seem to miss is that The Princess Bride seems to take place on what we might call "mostly Earth."
There are certainly references to things that seem not to exist on Earth: the countries of Florin and Gilder, shrieking eels, R.O.U.S.es, The Cliffs of Insanity. But there are many more examples of things that do resemble our own history and environment.
Of course, the presence of humans, horses, pigs, hippos, peanuts, and suchlike already suggest that we're on Earth. Probably even more compelling are these quotes from the film:
DO YOU WANT ME TO SEND YOU BACK TO WHERE YOU WERE, UNEMPLOYED, IN GREENLAND!!!
YOU WERE SUPPOSED TO BE THIS COLOSSUS
A reference to the Colossus of Rhodes.
I could give you my word as a Spaniard....
Inigo Montoya: You are using Bonetti’s Defense against me, ah?
Man in Black: I thought it fitting considering the rocky terrain.
Inigo: Naturally, you must suspect me to attack with Capa Ferro?
Man in Black: Naturally, but I find that Thibault cancels out Capa Ferro.
Don’t you? Inigo: Unless the enemy has studied his Agrippa… which I have.
These are references to real-world Italian fencers, Rocco Bonetti, Ridolfo Capo Ferro and Camillo Agrippa, and the Dutch fencer Gérard (Girard) Thibault d’Anvers.
Let me put it this way: have you ever heard of Plato, Aristotle, Socrates?
Because iocane comes from Australia, as everyone knows, and Australia is entirely peopled with criminals
The real Roberts has been retired fifteen years and living like a king in Patagonia.
Now, the fact that we're on "mostly Earth," rather than Earth, suggests that the land wars in Asia needn't necessarily represent anything that happened in our real history. However, considering that Vizzini appears to know about the transport of British and Irish prisoners to Australia, which occurred between 1788 and 1868, it seems reasonable to suppose that The Princess Bride takes place sometime after Napoleon's invasion of Russia in 1812.
A counter argument could be made that the costumes and technology we see do not at all resemble 19th century Europe. However, this is very common even in films which are supposed to take place on actual Earth. Consider Braveheart and William Wallace's
farcical representation as a wild and hairy highlander painted with woad (1,000 years too late) running amok in a tartan kilt (500 years too early).