AC mains isolated voltage measurement
You can use an analog isolation amplifier or digitize the signal and pass  it over an isolator. If you have to provide a DC-DC converter the frequency will be much higher than mains frequency so that transformer can be compact, and the signal isolation can be accomplished by opto-isolation or other methods (magnetic, RF, capacitive coupling etc.) that are built into commercial isolators.
Mains-frequency transformers tend to be large because the frequency is so low, and even more so if you want them to behave accurately as a potential transformer.