In the last years, much interest has grown around the concept of optical surfaces employing high contrast dielectric resonators. However, a systematic approach for the design of this optical surfaces under particular requirements has never been proposed. In this contribution, we describe this approach applied to the robust design of an array of microlenses characterized by a numerical aperture of NA=0.19 with a field of view of FOV = ±60 mrad in a bandwidth of 20 nm. Typically, dielectric resonators are engineered in such a way to have almost full transmissive surfaces with locally tunable phase. However, considering the multiple wavelengths and angles under which the lenses may work, it is difficult to get uniform transmission characteristics for all the dielectric resonators employed. The design strategy, here proposed, uses a particle swarm optimization routine to find the best resonator distribution able to meet the requirements considering the amplitude and phase dispersive characteristics of the resonators surfaces. In the optimization process, also the effects of possible manufacturing inaccuracies, such as variations of resonators radii, are taken into account, allowing a robust design of the structure, within the given manufacturing tolerances. Different designs, operating at 405 nm and 635 nm, are presented and their performances are discussed.