I feel like based on the description you gave it's just gonna function exactly like a large cannon and not going to be "distinct" enough to be added, so allow me to elaborate:
A mortar is going to be a roof-mounted weapon, its ammunition will be of HE type, not really for penetrating armor but a great area of effect, close to that of a missile. Now this is the weird part that I think will be fit for the weapon and most of you will think of me as a lunatic: the weapon isn't going to shoots the target right on the side, but rather target the enemy's roof after the mortar's shell leaves the barrel, it's going to travel until reaches to enemy's roof and explodes on a random place on top of the roof with the size of 2x2, dealing damage to the surrounding parts, if the target is out of range then the shell will explode upon entering contact with the range limit. Of course, the damage shouldn't be high since it explodes on the roof, where most people put their corridors, the weapon will have similar damage to a standard cannon, reload time should be around 5-10 seconds or so, the range would be rather long, but not up to several kilometers like in real life, should be around 500m or so. Now do I think a mortar is going to be added any time soon? Absolutely not, and it shouldn't, let me explain why:
First, a mortar would be ridiculously OP if added to vanilla even with the scaled-down damage, it would take away the challenge and the fun of vanilla combat of having to balance between weapons and armor on a single surface, and instead, people will just spam mortars on top of the roof while applying dummy-thick layers of armor "but toes eater it's the same with modded combat" yes I know, I enjoy modded combat, but vanilla combat is it's own thing and should be respected, many people enjoy vanilla combat and I think that the majority of them would agree with me, while it is fun to mess with the mortar around in creative mode, I don't think it will have enough positive impact to be added.
Secondly, the weapon is highly unrealistic for a space combat game to have a mortar, even cosmoteer. A mortar rely on gravity to calculate its trajectory and for it to have a longer range, it's just a scaled-down fun-size howitzer, why else would it point its barrel upwards, if you were to fire it in cosmoteer physics (yes I know it's not realistic) the shell will just fly over the enemy ship and IDK, just go on an infinite trip in space I guess "well just stop pointing it upwards and point it directly at the enemy"...that's literally a roof-mounted cannon but instead of Armor Piercing it uses High Explosive shells... Otherwise known as a flak cannon but without the proximity radar that made it possible to explodes mid-air...