We investigate the non-linear dynamics of the electrohydrodynamic instability of a viscoelastic polymeric film under a patterned mask. We develop a computational model and carry out 2D numerical simulations fully accounting for the flow and electric field in both phases. We perform a thorough parametric study and investigate the influence of the various rheological parameters, the applied voltage and the period of the protrusions of the mask in order to define the fabrication limits of this process in the case of patterned electrodes. Our results indicate that the effect of elasticity is destabilizing, in agreement with earlier studies in the literature based on linear stability analysis for homogeneous electric fields. However, the significance of the normal and shear polymeric stress components is found to change drastically as deformation advances, rendering inappropriate the lubrication approximation that neglects normal stresses. We also find that for low values of the Ca number a metastable state arises with finite interfacial deformation, the amplitude of which compares favourably with experimental observations in contrast with earlier predictions using linear theory. Though the critical voltage for this metastable state appears to be unaffected by the elasticity of the material, viscoelasticity affects the fabrication limit on the period of the protrusions of the top electrode.