I have been having some trouble understanding the storage of energy inside a spherical capacitor composed of two concentric spherical shells where the inside shell has radius $a$ and charge $2q$, while the outside shell has radius $b$ and charge $q$. We know that
$$\Delta V=-\int\vec{E}.d\vec{r}$$
and that $U=q\Delta V$, hence we can define
$$U=-\intop_{0}^{2q}\intop_{b}^{a}\vec{E}.d\vec{r}.dq$$
Or at least I hope so. But how should we think about it? The potential difference between $a$ and $b$ is defined as the work per unit charge that an external agent has to exert in order to bring a chunk of charge, say $dq$ from $b$ to $a$. And what we are doing here I only see it as summing all of the work needed to transport the $dq$'s individually but not counting with the interaction between them.
What I'm asking is the intuition to link the previous expression and:
$$\frac{1}{4\pi\epsilon_{0}}\sum_{i=1}\sum_{j>i}\frac{q_{i}q_{j}}{r_{ij}}$$
Plus if someone could give me a hint on where this comes from I would be very appreciated
$$U=\frac{1}{2}\epsilon_{0}\int E^{2}dV$$