show/hide this revision's text 2 added 47 characters in body

Here's one solution. There may be cleaner ones.

Let $E$ be as supposed. The natural inclusion $T : L^\infty([0,1]) \hookrightarrow L^2([0,1])$ is bounded, so $E = T^{-1}(E)$ is therefore also closed in $L^\infty$. By the open mapping theorem, it follows that $T^{-1}$ is bounded on $E$, so there exists $C$ such that for all $f \in E$, $||f||_\infty \le C ||f||_2$. Now if $||f||_2 = 1$, we have $||f||_\infty \le C$, and so by noting $$1 = \int |f|^2 \le C^2 m(|f| > \epsilon) + \epsilon^2$$ and taking, say, $\epsilon = 1/2$, we have $m(|f| > 1/2) \ge 1/4C^2$.

Now suppose $E$ is infinite dimensional; then it contains an $L^2$-orthonormal sequence $\{f_n\}$. By replacing $f_n$ by $-f_n$ as necessary we may assume that for each $f_n$, $m(f_n > 1/2) \ge 1/8C^2$. By a pigeonhole argument there is a set $A$ of positive measure where $f_{n_k} > 1/2$ for infinitely many $n_k$. n_k$ (edit: actually I am not sure about this step). Now $f = \sum_k k^{-1} f_{n_k}$ converges in $L^2$ and so $f \in E$; since the $L^2$ and $L^\infty$ norms are equivalent on $E$, the sum also converges uniformly to $f$ on a set of full measure. But this implies that $f = +\infty$ a.e. on $A$, which is absurd.

show/hide this revision's text 1

Here's one solution. There may be cleaner ones.

Let $E$ be as supposed. The natural inclusion $T : L^\infty([0,1]) \hookrightarrow L^2([0,1])$ is bounded, so $E = T^{-1}(E)$ is therefore also closed in $L^\infty$. By the open mapping theorem, it follows that $T^{-1}$ is bounded on $E$, so there exists $C$ such that for all $f \in E$, $||f||_\infty \le C ||f||_2$. Now if $||f||_2 = 1$, we have $||f||_\infty \le C$, and so by noting $$1 = \int |f|^2 \le C^2 m(|f| > \epsilon) + \epsilon^2$$ and taking, say, $\epsilon = 1/2$, we have $m(|f| > 1/2) \ge 1/4C^2$.

Now suppose $E$ is infinite dimensional; then it contains an $L^2$-orthonormal sequence $\{f_n\}$. By replacing $f_n$ by $-f_n$ as necessary we may assume that for each $f_n$, $m(f_n > 1/2) \ge 1/8C^2$. By a pigeonhole argument there is a set $A$ of positive measure where $f_{n_k} > 1/2$ for infinitely many $n_k$. Now $f = \sum_k k^{-1} f_{n_k}$ converges in $L^2$ and so $f \in E$; since the $L^2$ and $L^\infty$ norms are equivalent on $E$, the sum also converges uniformly to $f$ on a set of full measure. But this implies that $f = +\infty$ a.e. on $A$, which is absurd.