It varies under local laws and ordinances. Here in Parts Unknown, by the book any ebike with a throttle is legally a moped and like any moped requires an operator's license, registration with a license tag and liability insurance. It is illegal to operate one on an MUP.
In reality, it's sort of 'wild west'/libertarian on the ground. The LEOs are oblivious and most likely will remain so until some child gets hit/hurt by a speeding electric moped.