What does John 19:21 mean?
Jesus' enemies do not acknowledge Him as their King, in any sense (John 5:39–40). They pressured the Roman governor to execute Jesus, in part, by declaring their loyalty to a pagan emperor (John 19:15). For that reason, they object to Pilate labelling Jesus' cross with the title "King of the Jews" (John 19:19). Crucified victims frequently had their offenses displayed as a warning to others. Jewish leaders would prefer Pilate's inscription match their own criticism of Jesus: that He is not, in fact, Israel's King.Pilate knows Jesus is not a political threat (John 18:36–38), but he won't pass up an opportunity to insult Jewish leaders or flaunt his sense of power (John 19:22). Crucifying Jesus as "King of the Jews" sends a message about Roman dominance which fits their approach to conquered territories. People traveling in and out of the city will see this and be reminded of what happens to those who oppose the Empire.
In an ironic sense, this is the first example of Jesus being proclaimed, in writing, to the entire world. The inscription is in multiple languages (John 19:20), near a busy and diverse city, a major trading hub in a worldwide Empire. Sarcasm or not, the legitimate King is being announced to anyone who sees.