Let $T,L> 0$ two real numbers and we consider the Sobolev space $X := L^2(0,T; H^1(0,L))\cap H^{1}(0,T;H^{-1}(0,L))$. My question is:
Given $f \in X$, the trace $ t \mapsto f(t,L)$ belongs to what space? Could someone indicate me a reference?
The spatial evaluation (or trace) operator $\mathrm{tr}_L$ at $L$ is well defined and continuous on $H^s(0,L)$ for $s>1/2$; a classic reference is [LM, Chapter 1.9]. (Of course the range $s>1/2$ is exactly the one for which $H^s(0,L)$ is embedded into $C([0,L])$.)
Thus, an easy immediate answer would be to apply $\mathrm{tr}_L$ to your function $f \in L^2(0,T;H^1(0,L))$ in the sense of $f(t,L) = \mathrm{tr}_L[f(t)]$ which would give $$\bigl[t \mapsto f(t,L)\bigr] \in L^2(0,T).$$
If you want to squeeze a bit more: It is a classical result that $X \hookrightarrow C([0,T];L^2(0,L))$, see e.g. [LM, Chapter 1.3.1]. In particular, $X \hookrightarrow L^p(0,T;L^2(0,L))$ for every $p \in [1,\infty)$; so, if $f \in X$, then $$f \in L^p(0,T;L^2(0,L)) \cap L^2(0,T;H^1(0,L)) \hookrightarrow \Bigl[L^p(0,T;L^2(0,L)),L^2(0,T;H^1(0,L))\Bigr]_s$$ for all $s\in (0,1)$ and $p \in [1,\infty)$, where the space $Y_s$ on the right is the complex interpolation space. Since the (Bochner) Lebesgue spaces are compatible with complex interpolation as in [BL, Theorem 5.1.2] and $H^s(0,L) = [L^2(0,L),H^1(0,L)]_s$ (see again [LM, Chapter 1.9]), the interpolation space $Y_s$ is $$Y_s= L^q\bigl(0,T;[L^2(0,L),H^1(0,L)]_s\bigr) = L^q(0,T;H^s(0,L)), \quad \frac1q = \frac{1-s}p + \frac{s}2.$$
As noted above, $\mathrm{tr}_L$ is well defined (and continuous) on $H^s(0,L)$ for $s > 1/2$, so by sending $p \to \infty$ and $s \searrow \frac12$, we obtain that $$\bigl[t \mapsto f(t,L)\bigr] = \bigl[t \mapsto \mathrm{tr}_L [f(t)]\bigr] \in L^{4-\varepsilon}(0,T)$$ for every $\varepsilon > 0$.
[BL] Bergh, Jöran; Löfström, Jörgen, Interpolation spaces. An introduction, Grundlehren der mathematischen Wissenschaften. 223. Berlin-Heidelberg-New York: Springer-Verlag. X, 207 p. with 5 figs. DM 60.00; $ 24.60 (1976). ZBL0344.46071.
[LM] Lions, J. L.; Magenes, E., Non-homogeneous boundary value problems and applications. Vol. I. Translated from the French by P. Kenneth, Die Grundlehren der mathematischen Wissenschaften. Band 181. Berlin-Heidelberg-New York: Springer-Verlag. XVI,357 p. DM 78.00 (1972). ZBL0223.35039.