In recent years, novel two-dimensional materials such as graphene, bismuthene and transition-metal dichalcogenides have attracted considerable interest due to their unique physical properties. A range of physical effects can be transferred to the realms of photonics by creating artificial photonic lattices emulating these two-dimensional materials. Here, exciton-polaritons in semiconductor microcavities offer an exciting opportunity to study a part-light, part-matter quantum fluid of light in a complex lattice potential. In this paper, we study exciton-polaritons in a two-dimensional Lieb lattice of buried optical traps. The $S$ and $P_{xy}$ photonic orbitals of such a Lieb lattice give rise to the formation of two flatbands which are of greatest interest for the distortion-free storage of compact localized states. By using a well controlled etch-and-overgrowth technique, we manage to control the trapping as well as the site couplings with great precision. This allows us to spectroscopically monitor the flatness of the flatbands across the full Brillouin zone. Furthermore, we demonstrate experimentally that these flatbands can be directly populated by condensation under non-resonant laser excitation. Finally, using this advanced device approach we demonstrate resonant and deterministic excitation of flatband modes in transmission geometry. Our findings establish the exciton-polariton systems as a highly controllable, optical many-body system to study flatband effects and for distortion-free storage of compact localized states.