1) Dictators tend to build "Regime Defense Forces" not "Armies to win wars". If Mussolini fills more secure, he may be willing to allow the Italian army to become more of a true army. Don't know enough to give details.
2) Italy entered WW2 with too many older weapons (early 1930's) that were not up to the job. It appears that Italy did some debt fuel building early, then had a bit of a bust. More level buying patterns give you more modern Military in 1940. Also, a consistent buying pattern should lower costs.
3) If you are willing to go to WW1 time frame, then have Italy attack less often and have fewer deaths to war. Or have Italy gain more valuable things after the war, be it land or reparations.
4) You can have interwar improvements to the economy. Yes Italy has issue with lack of coal for example. But you can build hydroelectric dams as a way to help find other energy sources. You can focus on energy efficiency. You can try to subsidize support industries for war efforts. You can look for new mineral deposits. Build up strategic material reserves.
5) On #4, the oil in Libya was technically recoverable as far as I can tell. It is not too deep, and I have not seen any other issues that would prevent drilling. Likely a plan to find domestic energy sources would find this oil.
6) Good War Plans. Why was there no good war plans already prepared like. War Plan - Invade Malta short notice. War Plan - Defend Libya. Many of the insurmountable problems from OTL are trivial to solve is some field grade officers work through the details in the interwar years. Italy clearly was not ready for war in 1940, at least on a mental level on the senior military commanders.
Like many things in life, there is no miracle cure. Hundreds of little things were not as good as they should be, and to get better, one just has to start improving the little things. One caliber of rifle ammo. Better financial planning on arms purchases. More merit based promotions (notice - not merit based, just less political). Once alliance with Germany, be willing to do some licensing deals both ways. Send naval officers to work with RN until relations get too bad. Get someone to build good TDS on Battleships. Build more RR in Libya.