Solution (source code)

= Solution

Spherical symmetry and the integral <Gauss law> give $4\pi r^2E_r(r)=Q/\epsilon_0$ for $r>R$. Together with the stipulated zero interior field,
$$
\boxed{\mathbf E(r)=\begin{cases}0,&r<R,\\\dfrac{Q}{4\pi\epsilon_0r^2}\widehat{\mathbf r},&r>R.\end{cases}}
$$
The <electric field> jumps across the ideal charged surface; its value exactly on that surface is not needed for the volume integral. The <electrostatic energy of a uniformly charged spherical shell> is
$$
U=\frac{\epsilon_0}{2}\,4\pi\int_R^\infty\left(\frac{Q}{4\pi\epsilon_0r^2}\right)^2r^2\,dr=\boxed{\frac{Q^2}{8\pi\epsilon_0R}}.
$$
As a check, the shell has constant <electric potential> $Q/(4\pi\epsilon_0R)$, with zero reference at infinity, so $U=Q\phi(R)/2$ gives the same result.