X is pronounced differently in different languages because they all have different phonetic and orthographic conventions. I don’t see a reason for any two Latin-alphabet languages that both pronounce the same letters the same way, even if those two languages are both Romance languages. Certainly in English (and almost certainly in other languages) the idea of “conventional spelling” didn’t really exist until after the invention of the printing press. So people made it up as they went along, and that makes any expectation of consistency unrealistic.
But I think part of the problem here boils down to poorly-educated choir directors. I’m not kidding, even a little bit. It’s true that “excelsis” is pronounced “eggshellsis” in ecclesiastical Latin. I took a choir class in a secular high school, and our choir director rigidly insisted that “gloria in excelsis deo” be pronounced in accordance with church latin, which is appropriate for that context. But this choir director was certain that “x is pronounced ‘sh’ in Latin,’” full stop.
In hindsight, it’s clear that our choir director knew jack shit about Latin; he didn’t even know enough to know that he didn’t know. So he repeated a half-truth he had been taught and many students generally accepted what he said. But choir directors are not language scholars or classicists. I wouldn’t be shocked if more Americans were exposed to Latin via choirs than via classical Latin classes. No matter the genesis, lots of people are certain that lots of other people have it wrong. They’re both right; one set is right for ecclesiastical Latin and another set is right for classical Latin.
It’s pretty human to think that there’s one right way to use language, especially when you’ve spent a dozen years in school having your wrong usage/grammar/syntax corrected by teachers. But language is fluid and changes with time and context, even if we don’t expect it to. One of my [Attic] Greek professors used to tell stories about traveling in Greece and talking to Greeks who thought they understood Attic Greek because they could pick out some familiar words.
This is similar to how many English speakers naively-but-reasonably expect to open up Canterbury Tales and read middle English. It’s broadly similar to modern English, but it’s not nearly as comprehensible as, say, Shakespeare. The Great Vowel Shift was a thing, so modern English-speakers can’t just pick up Chaucer and run with it.
We even do this within contemporary language via code-switching. I’ll never forget how my first girlfriend, who was from Texas but had no Texan accent, suddenly developed a hell of a twang when she was pulled over by a Texas state trooper who had a similar drawl himself. How many syllables does “you all” have? Well, that depends on who is talking to whom.
The OP’s question is totally reasonable, but given all of the variation in pronunciation within a single language, I don’t think you can expect any consistency between languages, even closely related ones.
Edit: I’m not saying the OP is the sort to naively expect to read middle English or anything patronizing like that. I was just trying to point out that it’s common for people in general to underestimate how much variation there is in phonetics and orthography within a single language.