Criterion
Denote for shorthand:
$$S:=f(E)\quad T:=g(E)$$
Consider the operator:
$$\Gamma:\mathcal{G}(S)\to\mathcal{G}(T):(x,Sx)\mapsto(x,Tx)$$
It is well defined since:
$$\mathcal{D}(S)\subseteq\mathcal{D}(T)$$
And it is closed since:
$$\varphi_n\to\varphi,S\varphi_n\to\psi,\,T\varphi_n\to\chi\implies S\varphi=\psi,T\psi=\chi$$
Also its domain is complete:
$$\mathcal{D}(\Gamma)=\mathcal{G}(S):\quad\mathcal{D}(\Gamma)=\overline{\mathcal{D}(\Gamma)}$$
By closed graph theorem:
$$\varphi\in\mathcal{D}(S):\quad\|T\varphi\|^2\leq\|T\varphi\|^2+\|\varphi\|^2\leq\|\Gamma\|^2\left(\|S\varphi\|^2+\|\varphi\|^2\right)$$
By mean value theorem:
$$\int_A|g|^2\mathrm{d}\nu_\varphi\leq\int_A\|\Gamma\|^2\left(|f|^2+1\right)\mathrm{d}\nu_\varphi\implies|g|^2\leq\|\Gamma\|^2\left(|f|^2+1\right)\mod\nu_\varphi$$
So one obtains that:
$$|g|^2\leq\|\Gamma\|^2\left(|f|^2+1\right)\mod E$$
Conversely one has:
$$\int|g|^2\mathrm{d}\nu_\varphi\leq R^2\int|f|^2\mathrm{d}\nu_\varphi+R^2\|\varphi\|^2$$
Concluding the assertion.
Null Set
Remind that it holds:
$$\nu_\varphi(A)=0\iff E(A)\varphi=0$$
Regard the null set:*
$$N_0:=\bigcap_{\varphi\in\mathcal{H}}N_\varphi:\quad\nu_\varphi(N_\varphi)=0$$
Indeed one has:
$$E(N_0)\varphi\quad(\varphi\in\mathcal{H})\implies E(N_0)=0$$
That was desired!
Separable Spaces
For separable spaces:
$$N_0:=\bigcup_{\alpha\in\mathcal{A}}N_\alpha:\quad N_\alpha\in\mathcal{B}(\mathbb{C})\implies N_0\in\mathcal{B}(\mathbb{C})$$
By density one has:
$$E(N_0)\alpha=0\quad(\alpha\in\mathcal{A})\implies E(N_0)=0$$
That was desired.
*There's a flaw: It may fail to be Borel!