The Axis needed to achieve a total blockade and total suppression of the Malta defences, in order to undertake an invasion of malta. They had just about achieved those conditions by March 1942, although the conditions were never complete, and were "near achieved" at the wrong moment in time, since the invasion was set at no earlier than July 1942. By that time, the blockade had been broken and ther was no chance for the invasion being a success.
The other thing is that there are often criticisms about taking Crete and not Malta. Some argue that Crete should never have occurred. However, whilst Malta was a far more important target, because of its location and the facilities that existed on the island, if Malta had fallen and Crete retained, the centre of operations by the allies in the central basin by the allies would simply have shifted from Malta to Crete. The strategic aim behind the capture of Malta (the securing of the sea communications to North Africa) would not have been achieved if the British had been allowed to re-establish themselves nearby.
To achieve security for their sea communications to North Africa, the Axis had to fight their war much smarter than they did....they had to:
1) capture Malta
2) capture Crete
3) Maintain strong defences on Sicily and Sardinia
4) Occupy Tunisia, to get control of the ports in that territitory.
Fundamental to the overall failure in the theatre was thel lack of committment to the theatre. People have often tried to blame just Hitler, but really it was a systemic failure to appreciate the importance of the theatre by the whole German High command. Germany's view on operations was always eurocentric. They never really got it that the war was a truly global conflict.....