The intensity of an electromagnetic wave is defined as the magnitude of the time-average of the Poynting vector:
$$ I = \left|\left<\vec{S}\right>_t\right| $$
where $\vec{S} = \frac{1}{\mu_0} \vec{E} \times \vec{B}$.
For a plane wave $\vec{E} = {E}_0 e^{i(\vec{k} \cdot \vec{r}-\omega t)} $ one obtains
$$I = \frac{1}{2}c\epsilon_0 |\vec{E}_0|^2 $$
using $\vec{B}_0 = \vec{k} \times \vec{E}_0$, which follows from Maxwells equations.
From every slit, a spherical wave emerges (Huygens principle):
$$\vec{E} = \frac{\vec{E}_0}{r} e^{i(kr-\omega t)} $$ However in the context of the double slit experiment (or any diffraction/interference experiment) the intensity is given as
$$ I \propto | \vec{E} |^2 $$
in various textbooks and articles.
I do not see how this expression of $I$ is consistent with the definition above.
Thank you for your help!
Edit
Take a look at this similar post: Exact relationship between electric field and intensity
In the first answer, the person writes in the second line
"$ |\vec{H}| = \sqrt{\frac{\epsilon_0}{\mu_0}} |\vec{E}|$ for an electromagnetic wave in vacuum"
But this relation (as far as I know) only holds for plane waves, right? And very unfortunately, plane waves do not emerge from the double slits.