Let $(E,\mathcal E,\mu)$ be a probability space, $$L^2_0(\mu):=\left\{f\in L^2(\mu):\int f\:{\rm d}\mu\right\}$$ and $$U:L^2(\mu)\to L^2(\mu)\;,\;\;\;f\mapsto\int f\:{\rm d}\mu=\langle 1,f\rangle_{L^2(\mu)}1.$$ Note that $U$ is a nonnegative self-adjoint linear operator on $L^2(\mu)$ with $\mathcal N(U)=L^2_0(\mu)$. Moreover, if $(f_i)_{i\in I}$ is an orthonormal basis (whose existence is ensured by Zorn's lemma) of $L^2(\mu)$, then $$\sum_{i\in I}\langle Uf_i,f_i\rangle_{L^2(\mu)}=\sum_{i\in I}\left|\langle1,f_i\rangle_{L^2(\mu)}\right|^2=\left\|1\right\|_{L^2(\mu)}^2=1\tag1$$ by Parseval's identity. So, if $|I|\le|\mathbb N|$, then $U$ is trace-class (cf. When is $L^2(\mu)$ separable?)
Assuming that $L^2(\mu)$ is separable, we can infer (from general theory of compact self-adjoint operators on a Hilbert space) the existence of an orthonormal basis $(e_i)_{i\in I}$ of $L^2(\mu)$, $I=\mathbb N\cap[0,\dim L^2(\mu)]$, and a nonincreaing $(\lambda_i)_{i\in I}$ with $$Uf_i=\lambda_if_i\;\;\;\text{for all }i\in I.\tag2$$ Moreover, if $I_0:=\left\{i\in I:\lambda_i=0\right\}$, then $(f_i)_{i\in I_0}$ is an orthonormal basis of $\mathcal N(U)=L^2_0(\mu)$ and $(f_i)_{i\in I\setminus I_0}$ is an orthonormal basis of $\overline{\mathcal R(U)}={\mathcal N(U)}^\perp$.
Question: Is there an explicit form of the eigenvalues $\lambda_i$? And how can we determine the square-root $Q^{1/2}$ and an orhonormal basis of $L^2_0(\mu)$?
Clearly, we know that $$Q^{1/2}\sum_{i\in I}\lambda_i^{1/2}f_i\otimes f_i,\tag3$$ but I guess there is a simpler expression for $Q^{1/2}$ in the present case.
Remark: All the considerations above are an attempt to find a generalization of the following question: Can we generalize the following result on the spectral gap of a reversible Markov transition matrix?.
In this answer, there is no assumption that $L^2(\mu)$ is separable.
Note that $U^2=U$ (this is due to the assumption $\mu(E)=1$). Therefore, the minimal polynomial of $U$ exists and divides $x^2-x=x(x-1)$. Thus, $U$ has at most two eigenvalues $0$ and $1$. Note that $L^2(\mu)=\ker U\oplus\operatorname{im}U$. The eigenspaces of $U$ w.r.t. the eigenvalues $0$ and $1$ are $\ker U$ and $\operatorname{im}U$, respectively. So each $f\in L^2(\mu)$ is decomposed as $$(f-Uf)+(Uf)$$ with $f-Uf\in \ker U$ and $Uf\in\operatorname{im}U$.
By the way, it is possible that $U$ has only one eigenvalue $1$. If for example $\mathcal{E}=\{\emptyset,E\}$, then $U$ has only one eigenvalue $1$. ($U$ always has $1$ as an eigenvalue because the characteristic function $\chi_E$ is an eigenfunction of $U$ with eigenvalue $1$.)
Regarding a square root of $U$, since $U^2=U$, $U$ is a square root of itself. In fact, it is the only square root of $U$ which is self-adjoint and has non-negative spectrum.