What limits the stated maximum capacity of supported microSD XC cards in smartphones? microSD XC specification technologically supports capacities up to 2TB. However, a sizable number of even the top smartphone models are stated to only support capacities up to a lower boundary (but still higher than 32GB which is the hard limit for microSD HC).

What specifically is limiting this number? Logically speaking, if the onboard devices conform to the new standard, they shoudn't have any additional limitations, no? E.g. can this restriction be lifted with an alternative firmware?

A side question (comment if you feel it warrants a separte question): What would happen if I insert a larger card into one of these models?
Well, first of, that's a good question.

Periodically members of the industry come together and publish a standard that specifies how a device must perform if it's going to be, say, "Micro SD." This includes a range of capacities that a device must support if it is going to claim to support that kind of device.

Eventually, technology catches up and the original standard is no longer sufficient. For example, the original SD standard supported the FAT 12 and FAT 16 file systems which are good up to 2 GB but no higher. When this was no longer viable they went and modified the standard, which became "SDHC". This standard uses the FAT 32 file system and can use up to 32 GB.
The SDHC standard is now starting to not keep up with the available technology, so there's SDXC which again introduces a new file format and a new range of sizes (up to 2 TB now).

If you have a device and you program it to be able to read FAT 12, FAT 16, and FAT 32 then you can read SD and SDHC cards but not SDXC. You could publish this as "Can read microSD and microSDHC cards," but most users don't realize that there are different generations of card at play, so it's easier to just say "Works with cards up to 32 GB."

It's just the format of read/write, and not the actual hardware that limits the size.