  This letter presents a combined measurement of the energy spectra of
atmospheric $\nu_e$ and $\nu_\mu$ in the energy range between $\sim$100 GeV and
$\sim$50 TeV with the ANTARES neutrino telescope. The analysis uses 3012 days
of detector livetime in the period 2007--2017, and selects 1016 neutrinos
interacting in (or close to) the instrumented volume of the detector, yielding
shower-like events (mainly from $\nu_e+\overline \nu_e$ charged current plus
all neutrino neutral current interactions) and starting track events (mainly
from $\nu_\mu + \overline \nu_\mu$ charged current interactions). The
contamination by atmospheric muons in the final sample is suppressed at the
level of a few per mill by different steps in the selection analysis, including
a Boosted Decision Tree classifier. The distribution of reconstructed events is
unfolded in terms of electron and muon neutrino fluxes. The derived energy
spectra are compared with previous measurements that, above 100 GeV, are
limited to experiments in polar ice and, for $\nu_\mu$, to Super-Kamiokande.
