I feel that mortar is hybrid of an archer and cannons with splash but it is only inferior to each units when it comes to the role.
For anti buildings, it just lacks damage and range. Even with range upgrade, i assume it will lack the DPS of 2 cannons which is ideal for destroying defensive buildings in one shot except for castles, making them vulnerable to most defensive buildings even though its supposed to be good against the buildings. Also, their DPS becomes more dispersed than cannons because you have to make a lot of them and you have to rally to make sure they are focusing one thing down.
Against defenders, its slow attack projectile and vulnerability to defenders puts it in weird place, where it needs a meatshield to perform at its maximum potential but when it comes to killing things, archers just excel at killing defenders rather than mixing mortars,infantry and archers. So I used them few times when I first got them, and never used them again.