Hi Alex,
Can you please check following
1. If VREFH and VREFL are at same potential as VDDA and VSSA if they are selected as ANB2/ANA2 or ANB3/ANA3.
2. Is there any impedance between VSS and VSSA, have you placed any bead inductor in VSSA bath to isolate it from VSS? VSS and VSSA should be shorted and have common ground plane.
3. Can you please share shematic around ADC pins.
4. ADC peripheral has ADC_OFFSTn registers. have the offset value in these registers to eliminate any hardware/software offset in result (ADC_RSLTn) registers.