Basically, what you're saying is that a homogeneous electric field $\vec{E}(\vec{r},t)=\cos \omega t \ \hat {z}$ in vacuum requires you to have a magnetic field that satisfies
$$
\nabla \times \mathbf{B} =\frac{1}{c^2}\frac{\partial \mathbf{E}}{\partial t},
$$
giving you a non-homogeneous magnetic field, which would then require the electric field to satisfy
$$
\nabla \times \mathbf{E} = -\frac{\partial \mathbf{B}}{\partial t},
$$
that therefore needs an inhomogeneous electric field, in conflict with your initial assumption? Or, in other words, you're saying that the electric field assumed by the question, $\vec{E}(\vec{r},t)=\cos \omega t \ \hat {z}$, is inconsistent with the Maxwell equations?
If that is what you're saying, then: good! you're right. That electric field is not, strictly speaking, compatible with the Maxwell equations.
It is, however, an excellent and interesting approximation to useful solutions under suitable approximations (specifically, the dipole approximation). And, under that approximation, you neglect both the magnetic field and the conflict that this creates with the Ampère-Maxwell law. This obviously means that the fields are not precisely correct, and that there is the possibility of non-dipole effects (which come in a hierarchy, starting with magnetic dipole effects and then through electric quadrupole field dependences, and then upwards), but if the system is localized enough then those effects can be completely negligible.