Maybe!
It depends on what's wrong with the incoming mains waveform. Iron core transformers have limited bandwidth, so fast spikes, powerline communications databursts, much higher harmonics etc. will be severely attenuated on the secondary side, Also they will start to saturate if overvoltaged so the output may not be proportional to the input.
OTOH if you don't have access to a CAT II or better isolated differential probe, its going to give you at least a rough idea if there is excessive waveform distortion without a significant risk of electrocution or blowing up your scope. Also, from the project's point of view, it doesn't really matter what the mains supply actually looks like as long as the secondary side waveform is reasonably clean near the peaks of the waveform, as that's the only part of the waveform that actually contributes to the ripple on unregulated DC rail.