What does an AC signal look like when it is grounded with a DC signal?
It does look like the headlight runs on AC - this is quite common, since filament lamps work well on AC and it avoids having a rectifier in that part of the circuit.  So for a LED replacement you will need a rectifier.  This won’t resolve the flicker at low revs though, adding a capacitor may help.