Work remotely from where..outer space? ns2
If the company is not tax resident in Gibraltar and its place of operation, management and control is in Malta then that is where it will be considered tax resident. It would be an abuse of your resident non-domicile status to say the company is non-resident when it's run from Malta and all money is earned from Malta while your sat in your Malta apartment typing on a keyboard as a 1 man company....lol.︀
The best way is to proper structure the company so it really is an offshore︁ company managed and controlled from Gibraltar. Then you can say any money earned from it︂ really is offshore income.
Speak to an offshore agent they may have solutions that give︃ your company more real presence in Gibraltar. Or get a clear tax ruling from Malta︄ tax commissioner to cover your back.