I replace $[0,1]$ by $I:=[-1,1]$. We have to produce a sequence $f_n:\ I\to{\mathbb R}$ of continuous functions which is a Cauchy sequence in $L^2(I)$ but does not converge in $L^2(I)$ to an $f\in X$.
Put $f_n(t):=\cases{n t\quad &$(|t|\leq{1\over n})$ \cr {\rm sgn}\ t & $(|t|\geq{1\over n})$ \cr}\ .$ Let an $\epsilon >0$ be given. When $m$, $n>\frac1\epsilon$ then $|f_m(t)-f_n(t)|\leq 1$ when $|t|\leq\epsilon$, and $=0$ when $|t|>\epsilon$. Therefore $\|f_m-f_n\|^2\leq 2\epsilon$, which shows that $(f_n)_{n\geq1}$ is a Cauchy sequence in $L^2(I)$. Therefore the $f_n$ converge in $L^2(I)$ to a certain $f\in L^2(I)$.
Assume that this $f$ has a continuous representant, again denoted by $f$, and that $f(0)=:c\leq0$. Then there is an $\epsilon_0>0$ with $f(t)\leq{1\over 2}\qquad(0\leq t\leq\epsilon_0)\ .$ When $n>{2\over\epsilon_0}$ then $f_n(t)=1\qquad({\epsilon_0\over2}\leq t\leq\epsilon_0)\ .$ It follows that $|f_n(t)-f(t)|\geq{1\over2}$ on an interval of length ${\epsilon_0\over2}$, and this implies $\|f_n-f\|^2\geq{\epsilon_0\over 8}$ for all these $n$. This contradicts the already established fact $\lim_{n\to\infty} f_n=f$ in $L^2(I)$.