I know that because i'm working on an infinite-measure space it could be tricky. And from my experience the answer to my question is probably no..
But nevertheless, I can't think of a non-bounded $L^2$-integrable function, because the integral would simply be $\infty$..
thanks
This function is a counterexample: $f\in L^2(\mathbb R)\setminus L^\infty(\mathbb R)$ with $$ f(x) = \begin{cases} |x|^{-1/4} & \text{ if } |x|\le 1\\ 0 & \text{ if } |x|>1. \end{cases} $$ The integrable singularity is located on a bounded set, which shows that also the inclusion $L^2(a,b)$ is not a subset of $L^\infty(a,b)$ for an open interval $(a,b)$.