At this level of generality you can make $X=X \times X$ happen quite easily. Take a discrete space of any infinite cardinality, for instance. Or topologize $X=A^B$ by whatever means and compare $X \times X = A^{B \sqcup B}$; under various mild assumptions on $B$ those spaces would be homeomorphic.