  We build a theoretical model for the electronic properties of the
two-dimensional (2D) electron gas that forms at the interface between
insulating SrTiO$_3$ and a number of polar cap layers, including LaTiO$_3$,
LaAlO$_3$, and GdTiO$_3$. The model treats conduction electrons within a
tight-binding approximation, and the dielectric polarization via a
Landau-Devonshire free energy that incorporates strontium titanate's strongly
nonlinear, nonlocal, and temperature-dependent dielectric response. The
self-consistent band structure comprises a mix of quantum 2D states that are
tightly bound to the interface, and quasi-three-dimensional (3D) states that
extend hundreds of unit cells into the SrTiO$_3$ substrate. We find that there
is a substantial shift of electrons away from the interface into the 3D tails
as temperature is lowered from 300 K to 10 K. This shift is least important at
high electron densities ($\sim 10^{14}$ cm$^{-2}$), but becomes substantial at
low densities; for example, the total electron density within 4~nm of the
interface changes by a factor of two for 2D electron densities $\sim 10^{13}$
cm$^{-2}$. We speculate that the quasi-3D tails form the low-density
high-mobility component of the interfacial electron gas that is widely inferred
from magnetoresistance measurements.
