  Quantum confinement in a thin-film geometry offers viable routes for tuning
the critical properties of superconductors through modification of both density
of states and pairing interaction. Low-density systems like doped strontium
titanate are especially susceptible to these confinement-induced effects. In
this paper, we show that the superconducting critical temperature $T_c$ is
enhanced through quantum confinement in
SrTiO$_3$/SrTi$_{1-x}$Nb$_x$O$_3$/SrTiO$_3$ heterostructures at $x=1\%$
concentration, by measuring resistivity transitions and the Hall carrier
density for different thicknesses of the doped layer. We observe a nonmonotonic
raise of $T_c$ with decreasing layer thickness at constant carrier density as
estimated from the Hall effect. We analyze the results by solving a two-band
model with a pairing interaction reproducing the density-dependent $T_c$ of
doped SrTiO$_3$ in the bulk, that we confine to a potential well established
self-consistently by the charged Nb dopants. The evolution of the theoretical
$T_c$ with thickness agrees well with experiments. We point out the possible
role of density inhomogeneities and suggest novel methods for engineering
superconductivity in epitaxial thin films.
