Let $H$ be a separable Hilbert space. And $T: H \to H$ a compact operator. Now consider $L_2^H$ the space of squared integrable $H$ random elementents. This space is a Hilbert space with the inner product $E(\langle X, Y \rangle)$.
Is $T: L_H^2 \to L_H^2$ also a compact operator?
In general, no. For example, consider $H = \mathbb{R}$ and let $T: \mathbb{R} \to \mathbb{R}$ be the identity map. Then $T$ is compact by Heine-Borel.
However, the map induced by $T$ on $L_H^2 = L^2(\Omega)$ is also the identity map and the identity map is compact if and only if the underlying space is finite dimensional.