In general, we might ask when we can find interesting spaces $X, Y$ such that $X$ is homeomorphic to $[X, Y]$. If we work in a <a href="https://ncatlab.org/nlab/show/convenient+category+of+topological+spaces">convenient</a> (in particular, cartesian closed) category of topological spaces, then by the <a href="https://ncatlab.org/nlab/show/Lawvere's+fixed+point+theorem">Lawvere fixed point theorem</a> $Y$ must have the fixed point property. Happily, $Y = [0, 1]$ does in fact have the fixed point property (e.g. by the intermediate value theorem), so this is not an obstruction.

I know that computer scientists have constructed spaces $X$ such that $X$ is homeomorphic to $X^X$ in <a href="https://ncatlab.org/nlab/show/domain+theory">domain theory</a>, but I don't know enough about it to tell whether the techniques are relevant here.