What's the meaning of "endorse" here?
It's just slightly sloppy usage. From OED - endorse - to confirm, sanction, countenance, or vouch for (statements, opinions, acts, etc.; occasionally, persons)
The stamp itself probably isn't actually endorsed - the primary sense is that the stamp is the "endorsement" authorising entry to the territory.
If you want to be pedantic, I suppose in some cases you could say the stamp was endorsed. If the stamp was actually a bit of gummed paper, it might be stamped/franked to indicate that it really was officially put there. But usually the stamp on a passport is just ink from a stamping device.
Strictly speaking, it should be "...an endorsing stamp in the passport", but that's a bit "wordy".
It means sign, and is the second meaning of the word according to NOAD.
2 sign (a check or bill of exchange) on the back to make it payable to someone other than the stated payee or to accept responsibility for paying it. *(usu. be endorsed on) write (a comment) on the front or back of a document.
To endorse a document is, among other things, to make a mark on it in some way to confirm its authenticity. Originally, any such mark was made on the back of a document, which accords with the word’s etymology. In your example, what is being endorsed is the passport, not the stamp. The writer seems to have got confused, and would have done better to have omitted the word endorsed altogether.