  Based on first-principles calculations including a Coulomb repulsion term, we
identify trends in the electronic reconstruction of $A$NiO$_2$/SrTiO$_3$(001)
($A=$ Pr, La) and $A$CuO$_2$/SrTiO$_3$(001) ($A=$ Ca, Sr). Common to all cases
is the emergence of a quasi-two-dimensional electron gas (q2DEG) in
SrTiO$_3$(001), albeit the higher polarity mismatch at the interface of
nickelates vs. cuprates to the nonpolar SrTiO$_3(001)$ substrate (${3+}/0$ vs.
${2+}/0$) results in an enhanced q2DEG carrier density. The simulations reveal
a significant dependence of the interfacial Ti $3d_{xy}$ band bending on the
rare-earth ion in the nickelate films, being $20$-$30\%$ larger for PrNiO$_2$
and NdNiO$_2$ than for LaNiO$_2$. Contrary to expectations from the formal
polarity mismatch, the electrostatic doping in the films is twice as strong in
cuprates as in nickelates. We demonstrate that the depletion of the self-doping
rare-earth $5d$ states enhances the similarity of nickelate and cuprate Fermi
surfaces in film geometry, reflecting a single hole in the Ni and Cu
$3d_{x^2-y^2}$ orbitals. Finally, we show that NdNiO$_2$ films grown on a polar
NdGaO$_3(001)$ substrate feature a simultaneous suppression of q2DEG formation
as well as Nd~$5d$ self-doping.
