[In what follows $0^{0}$= 1 by convention.]

Is there some closed infinite dimensional linear subspace $F$ of $L^{2}(0,1)$ such that $\left|f\right|^{\left|f\right|}$ belongs to $L^{2}(0,1)$ for all $f$ in $F$ ?

This problem is related to the Erdos - Shapiro - Shields paper [ESS]. From this paper it follows that the answer is negative if $\left|f\right|^{\left|f\right|}$ is replaced by $\left|f\right|^{\left|f\right|^{2}}$.

Some thoughts. Suppose that such an $F$ exists, and take some $p > 2$. Let $f$ be in $F$.

Then clearly $g:=(p/2)\cdot f$ is in $F$, too, hence $h :=\left|g\right|^{\left|g\right|}$ belongs to $L^{2}(0,1)$.

Next, it is easy to see that $\left\Vert f\right\Vert _{p}^{p}\leq1+\left\Vert h\right\Vert _{2}^{2}<+\infty$.

Therefore, $F$ is contained in $L^{p}(0,1)$ as a linear subspace (i.e., algebraically).

Now, applying the Closed Graph Theorem to the natural linear embedding $j:(F, ||.||_{2})\rightarrow L^{p}(0,1)$, it follows that $j$ is continuous. Consequently, the Hilbertian 2-norm and the $p$-norm are equivalent on $F$. Moreover, it follows that $F$ is complete w.r.t. the $p$-norm, and, in turn, it is a closed subspace of $L^{p}(0,1)$.

And this is true for all $p > 2$.