  Deep observations have detected extended Ly$\alpha$ emission nebulae
surrounding tens of quasars at redshift 2 to 6. However, the metallicity of
such extended haloes is still poorly understood. We perform a detailed analysis
on a large sample of 80 quasars at $z\sim3$ based on MUSE-VLT data. We find
clear evidence of extended emission of the UV nebular lines such as CIV or HeII
for about 20$\%$ of the sample, while CIII] is only marginally detected in a
few objects. By stacking the cubes we detect emission of CIV, HeII and CIII]
out to a radius of about 45 kpc. CIV and HeII show a radial decline much
steeper than Ly$\alpha$, while CIII] shows a shallower profile similar to
Ly$\alpha$ in the inner 45 kpc. We infer that the average metallicity of the
circumgalactic gas within the central 30-50~kpc is $\sim$0.5 solar, or even
higher. However, we also find evidence of a component of the Ly$\alpha$ haloes,
which has much weaker metal emission lines relative to Ly$\alpha$. We suggest
that the high metallicity of the circumgalactic medium within the central 30-50
kpc is associated with chemical pre-enrichment by past quasar-driven outflows
and that there is a more extended component of the CGM that has much lower
metallicity and likely associated with near-pristine gas accreted from the
intergalactic medium. We show that our observational results are in good
agreement with the expectations of the FABLE zoom-in cosmological simulations.
