It depends.....At the risk of sounding utterly confused (because I am) - I don't want to be too pedantic about the issue of legality but.....
ebikes in the UK have an exemption from road traffic regs, fine, got that, so it would be very unusual for a magistrate to have an effect on the ebiker's driving license regardless of the law that has been broken.
And so ebikes are actually classed as bicycles regardless of their power output or function, so in effect, anything goes as far as the law is concerned, is that correct? Unless you have a plate fitted and everything else meets the current legislation, you are not in the class of an ebike (does the ebike class exist)?
So a home build high power, throttle only machine is no different to a big brand plateless machine in terms of it's vehicle class and legal status?
As has been said there are many legal gray areas. However, one area which does not appear to be gray is the one regarding 'maximum assisted speed'. If the motor helps you significantly above 15.5 mph then it's no longer an e-bike but a motor vehicle in the eyes of the law.
This would apply to a complete powered bike you may have bought or one where you or someone else has fitted a kit to an existing bike.
Enforcing the rule would be a little trickier. We don't know whether the 15.5 mph is in effect cast in stone or whether you're allowed the usual '10% plus 2' allowance which is generally given by magistrates when enforcing motor vehicle speed limits. AFAIK there have been no test cases as yet.
Most of us wouldn't want to take too big a chance, as the penalties could be dire. As has been said before, once your 'e-bike' is considered to be a motor vehicle you could be in line for confiscation, points on or loss of licence, and a fine. It's likely that the assisted speed issue will be the critical thing at present.
I'd suggest that no-one purchases anything which is clearly advertised as being illegal in the UK or Europe if they intend to use it on the road. That would establish a presumption of the fact that the rider would know perfectly well he/she was breaking the law.
Rog.