A typical voltmeter will give the average DC voltage of the rectified sinewave, which is 0.636 of the peak sinewave voltage.
When you add the capacitor, it charges up to the peak of the sinewave which is 1 / 0.636 = 1.57 of the average or 1.57 * 20V = 31V.