A0538-66 is a Be/X-ray binary (Be/XRB) hosting a 69 ms pulsar. It emitted bright X-ray outbursts with peak luminosity up to $sim 10^{39}$ erg/s during the first years after its discovery in 1977. Since then, it was always seen in quiescence or during outbursts with $L_x lesssim 4 times 10^{37}$ erg/s. In 2018 we carried out XMM-Newton observations of A0538-66 during three consecutive orbits when the pulsar was close to periastron. In the first two observations we discovered a remarkable variability, with flares of typical durations between $sim$2-50 s and peak luminosities up to $sim 4times 10^{38}$ erg/s (0.2-10 keV). Between the flares the luminosity was $sim 2times 10^{35}$ erg/s. The flares were absent in the third observation, during which A0538-66 had a steady luminosity of $2times 10^{34}$ erg/s. In all observations, the X-ray spectra consist of a softer component, well described by an absorbed power law with photon index $Gamma_1approx 2-4$ and $N_Happrox 10^{21}$ cm$^{-2}$, plus a harder power-law component ($Gamma_2approx 0-0.5$) dominating above $sim$2 keV. The softer component shows larger flux variations than the harder one, and a moderate hardening correlated with the luminosity. The fast flaring activity seen in these observations was never observed before in A0538-66, nor, to our best knowledge, in other Be/XRBs. We explore the possibility that during our observations the source was accreting in a regime of nearly spherically symmetric inflow. In this case, an atmosphere can form around the neutron star magnetosphere and the observed variability can be explained by transitions between the accretion and supersonic propeller regimes.