Let $(\Omega ,\mathcal F,\mathbb P)$ a probability space and $(\mathcal F_t)_t$ a filtration. In all example I can see, we always have that $$\mathbb E\int_0^T H_s^2ds=\int_0^T \mathbb E[H_s^2]ds,$$ when $s\mapsto H_s$ is a.s. continuous and $\omega \mapsto H_s(\omega )$ adapted. So is it true in general that if $s\mapsto H_s$ a.s. continuous and $\omega \mapsto H_s(\omega )$ adapted, then $$\mathbb E\int_0^T H_s^2ds=\int_0^T \mathbb E[H_s^2]ds \ \ ?$$
I know that since $H_s\geq 0$ for all $\omega $ and all $s$, it's enough to prove that $(\omega ,s)\mapsto H_s(\omega )$ is measurable. I would say that it's true, but I have difficulties to prove it. But maybe it's not true ? but I can't provide a counter-example.
$H_s(\omega) =\lim_{n \to \infty} H_{\frac {[ns]} {n}}(\omega)$ a.s. so $H$ is jointly measurable (w.r.t. the completion of $P$). Hence the equation is true.
$H_{\frac {[ns]} {n}}(\omega)=\sum_k H_{\frac k n} (\omega) I_{k \leq ns <k+1}$. Each term here is a product of a measurable function of $s$ and a measurable function of $\omega$. This makes each term, hence the sum jointly measurable. Since limit of measurable functions is measurable it follows that $H_s(\omega)$ is jointly measurable.