I think this is part of my confusion. Wouldn't most 4kw ebike hubs be capable of much more than my little 4kw esk8 motor? I understand inflating specs for the sake of marketing but ebike motors seem to be under rated right?
The power isn't directly comparable as just power. You have to compare specific motor and system design, usage, conditions, etc.
For instance...the tiny RC motors are only capable of those power levels when used at high RPM, so that the RPM itself is part of the power creation. (power = speed x torque) If you tried to use one of those small high speed motors at say, typical hubmotor RPM, for that kind of continuous power, it would burn up, because it would be running so far below it's winding RPM that it's BEMF would be negligible, so current would remain high, and waste heat generation would remain high. But if you run it as a middrive (or even friction drive) so it can run near it's correct RPM for the voltage it's used at, then it could produce much of the power it was actually designed to, as long as the motor can keep it's BEMF up and phase current down.
This does *not* mean it can produce what an ad says it can, outside it's original intended use, because the ground vehicle usage is not going to have the built in cooling of the RC usage, and it's going to have far more mass to accelerate so the power it requires to do this will be used for far longer than it would in the RC usage, so the motor will be at lower RPM than intended for the given voltage and load for far longer, and heat will be generated in higher amounts for longer.
So if you take an RC motor (etc) that normally runs at 5000RPM and then stick it in a usage that loads it up at only 500RPM, you can only use it at a tenth of the power it could have been used at, at most (assuming equivalent cooling, etc).
Conversely, if you were to take a hubmotor and (assuming it could physically handle the RPM) spin it as fast as the tiny RC motor, then it could produce proportionally more power than it did at the slow RPM in the wheel.
Ratings.... :/
Hubmotor (and other motor) "ratings" are worth very little, usually "made up" by a seller or even a manufacturer, with no dyno testing to find out what they can actually do under a variety of conditions and usages. They may be based on some form of reality, such that some other similar motor that *was* dyno tested can handle some amount of power, so the maker or seller of this different motor claims only a "little" more than that one could do, for instance.
Many motors are sold as a wattage that fits a specific legal requirement, but could actually handle much more if used correctly in the right system and riding conditions, etc. Other motors are sold as being far more capable than they actually are, so they could handle a *peak* power for a few seconds that is close to the claims, but if you did that continuously they'd overheat.
But none of the ratings are applicable outside the specific usage and conditions they're designed for, so if they don't provide that info as well, the rating isn't useful--you'd have to assume a specific usage and conditions, whcih may or may not have anything to do with what they meant. Ebikes.ca has a good page about motor ratings that sums this all up in other ways:
"There's no such thing as a rated watt!" Read here for why we don't advertise a simple power rating for the motors we sell. Also, have a look at our Youtube video where Justin talks about the power to propel bicycles in <a href="https://www.youtube.com/watch?v=ALde6zhLPs0">"School of Watts"</a>.
ebikes.ca
All of those things are also true of the controllers used for them. (and even batteries (there is LOTS of discussion around here about battery "ratings"))
I highly recommend checking out the simulators at ebikes.ca to see how all the different things interact to change system behavior and requirements; experimenting with it will teach you quite a bit about how things actually work under various conditions without spending any money on parts and blowing them up.