I used to commute to work by ebike, 19 miles each way, 5 days a week for a couple years. Got in amazing shape. I would would interval train on the commute, and go all out on the way there and back. You can train more intensely on an ebike, because you can go until failure repeatedly, and don't have to leave anything in the tank for the ride home. On a regular bike, if you over do it and your legs give out, then you're stranded.
On the weekends I would ride my road bike, and it wasn't long before outgrew my riding partners in a major way.