As Martin says, it's best to contact a competent tax lawyer in Malta, but here's my armchair analysis:
So this is what the regulation says: Article 7
1. The Member State of a taxpayer shall treat an entity, or a permanent establishment of which the profits are not subject to tax or are exempt from tax in that Member State, as a controlled foreign company where the following conditions are met:
(a) in the case of an entity, the taxpayer by itself, or together with its associated enterprises holds a direct or indirect participation of more than 50 percent of the voting rights, or owns directly or indirectly more than 50 percent of capital or is entitled to receive more than 50 percent of the profits of that entity; and
Assuming this is true for the Gibraltar LTD.
(b) the actual corporate tax paid on its profits by the entity or permanent establishment is lower than the difference between the corporate tax that would have been charged on the entity or permanent establishment under the applicable corporate tax system in the Member State of the taxpayer and the actual corporate tax paid on its profits by the entity or permanent establishment.
Malta has a holding regime where qualifying participating holdings are exempted from tax on dividends, so the tax on Malta Holding LTD's dividends from Malta LTD would be 0%.
An argument that the Gibraltar LTD is paying negative corporate tax because it's getting refunds from Malta LTD seems like it won't fly as "actual corporate tax
paid" as it's not "corporate tax" paid in Gibraltar, and it's not "paid", it's received.
For the purposes of point (b) of the first subparagraph, the permanent establishment of a controlled foreign company that is not subject to tax or is exempt from tax in the jurisdiction of the controlled foreign company shall not be taken into account. Furthermore the corporate tax that would have been charged in the Member State of the taxpayer means as computed according to the rules of the Member State of the taxpayer.
Again, computed according to the Maltese holding regime system of 0% tax.
2. Where an entity or permanent establishment is treated as a controlled foreign company under paragraph 1, the Member State of the taxpayer shall include in the tax base:
<rules regarding passive income and substance requirements>
Note that the Gibraltar LTD isn't necessarily treated as a CFC company under EU rules, so the passive income and substance requirements don't need to apply.
3. <Various exceptions to CFC status that member states might put into law>
4. <More lenient variations on paragraph 2>
Of course Malta might get CFC rules that cover the Gibraltar LTD case, but it doesn't seem like it's
required.