The electronic properties of NdGaO3/SrTiO3, LaGaO3/SrTiO3, and LaAlO3/SrTiO3 interfaces, all showing an insulator-to-metal transition as a function of the overlayer-thickness, are addressed in a comparative study based on x-ray absorption, x-ray photoemission and resonant photoemission spectroscopy. The nature of the charge carriers, their concentration and spatial distribution as well as the interface band alignments and the overall interface band diagrams are studied and quantitatively evaluated. The behavior of the three analyzed heterostructures is found to be remarkably similar. The valence band edge of all the three overlayers aligns to that of bulk SrTiO3. The near-interface SrTiO3 layer is affected, at increasing overlayer thickness, by the building-up of a confining potential. This potential bends both the valence and the conduction band downwards. The latter one crossing the Fermi energy in the proximity of the interface and determines the formation of an interfacial band offset growing as a function of thickness. Quite remarkably, but in agreement with previous reports for LaAlO3/SrTiO3, no electric field is detected inside any of the polar overlayers. The essential phenomenology emerging from our findings is discussed on the base of different alternative scenarios regarding the origin of interface carriers and their interaction with an intense photon beam.