The bike itself, in terms of the mechanics are equally as efficient. As you have mentioned the drivechain are very similar.
However, you fail to take into account the motor and and what the bike is doing while travelling.
The body position of a person on a bike allows greater pedal efficiency on a road bike. Road bikes are also generally lighter because they don't have to be made to withstand jumps and bumps.