The peculiar features of domain walls observed in ferroelectrics make them promising active elements for next-generation non-volatile memories, logic gates and energy-harvesting devices. Although extensive research activity has been devoted recently to making full use of this technological potential, concrete realizations of working nanodevices exploiting these functional properties are yet to be demonstrated. Here, we fabricate a multiferroic tunnel junction based on ferromagnetic La0.7Sr0.3MnO3 electrodes separated by an ultrathin ferroelectric BaTiO3 tunnel barrier, where a head-to-head domain wall is constrained. An electron gas stabilized by oxygen vacancies is confined within the domain wall, displaying discrete quantum-well energy levels. These states assist resonant electron tunnelling processes across the barrier, leading to strong quantum oscillations of the electrical conductance.