TITLE: Subspaces of $L^{2}$ 
QUESTION [6 upvotes]: [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$.
[ESS] http://projecteuclid.org/DPubS/Repository/1.0/Disseminate?view=body&id=pdf_1&handle=euclid.mmj/1028999306

REPLY [4 votes]: The classical lacunary series example allows you to integrate anything that is $e^{O(|f|^2)}$, so it works for your question. It seems that for reasonable (say, positive, increasing, and convex) functions $\Phi$, the complete answer is the following: A closed infinite-dimensional subspace $F$ such that $\Phi(|f|)$ is integrable for all $f\in F$ exists if and only if $\log\Phi(x)=O(x^2)$. The reason is that you can always create a random function in the unit ball that is pointwise almost Gaussian by taking a random linear combination of large number $n$ of the elements in the orthonormal basis of $F$ with random coefficients of size $n^{-1/2}$.