Integrating conventional optics into compact nanostructured surfaces is the goal of flat optics. Despite the enormous progress of this technology, there are still critical challenges for real world applications due to a limited efficiency in the visible, on average lower than 60%, which originates by absorption losses in wavelength thick (≈ 500 nm) structures. Another issue is the realization of on-demand optical components for controlling vectorial light at visible frequencies simultaneously in both reflection and transmission, and with a predetermined wavefront shape. In this work, we developed an inverse design approach that allows the realization of highly efficient (up to 99%) ultra-flat (down to 50 nm thick) optics for vectorial light control and broadband input-output responses on a desired wavefront shape. The approach leverages on a hidden network of universal approximators, which exist in the physical layer of suitably engineered semiconductor nanostructures. Near unity performance results from the ultra-flat nature of these surfaces, which reduces absorption losses to almost negligible values. Experimentally, we discuss polarizing beam splitters, comparing their performances