Output of XOR gate with high-impedance input
To answer your actual question, no, the output of a gate is never "Z", unless it's specifically designed as a tristate gate with an output enable.

In general, inputs to gates that are "Z" are treated the same as "X", and the output is either "0", "1" or "X" as appropriate.

For the specific case of the XOR with its inputs tied together, your original  statement that input "X" gives output "0" is correct &mdash; although many simple-minded logic simulators get this wrong. The problem is that they can't distinguish between two inputs being the same unknown value versus two independent unknown values.