So far as the economic aspects go, and trying to summarise some complex issues in a few paragraphs, Japan and Germany had similar problems at the core of their economies, although Japan’s were much worse as it had very little in the way of natural resources outside agriculture while it had rapidly expanding industries which needed more resources than the occupation of Manchuria could supply. Germany had more in the way of some natural resources, but it still needed to import a lot of critical materials which it couldn’t do for much of the war in the quantities required, thus contributing ‘ersatz’ to the world’s vocabulary as a derisive term with its attempts to make things with alternative materials.
Both Germany and Japan lacked direct access to oil, which was becoming increasingly necessary for civilian transport and industry, and critical for military purposes. It was the knowledge that Japan’s oil reserve would be exhausted in a year after the West imposed oil embargoes that was one of the major factors which made Japan decide in mid-1941 that it had to go to war if the embargoes were not lifted. Hence the Japanese drive to the NEI (Indonesia) and Borneo for oil, with the added benefit that Borneo crude could be used unrefined for the IJN ships. Germany also needed oil, hence the drive for the Rumanian oilfields. One strategic aim of the Allies was to prevent Germany and Japan linking up in Iran and getting access to its oil, thereby depriving the Allies, primarily Britain from memory, of it and dramatically altering the relative capacities, notably naval, of the Axis powers. This was one of the reasons the Burma campaign was important, to prevent Japan getting to Iran.
Both Germany and Japan lacked direct access to rubber, which was becoming increasingly important for transport and other purposes, especially military purposes. The bulk of it came from Malaya, which was a British colony.
There were other resource issues which encouraged the Axis powers to go to war, along with a host of non-economic issues to do with arrogant nationalism and fascist ideologies and so on.
The measure of the economic changes wrought by the war in favour of the Axis powers is illustrated by a report by Gen Dwight Eisenhower shortly after Japan had conquered Malaya and the NEI in which he noted that Japan now controlled (I can’t recall the exact proportions) something like almost all of the world’s rubber resources and the bulk of its tin resources. Japan went in a few months from having no rubber and little tin to having more than it could use, while denying those resources to the Allies.
There were also other economic factors which contributed to the move to war in Japan and Germany which both had economies heavily dependent upon military production, such as Krupp in Germany and the major companies known as the zaibatsu in Japan. The analogy is with the post-war (and more so during the war) military-industrial complex in the US where a significant part of the economy is related to military production.
If Germany and Japan had achieved their economic aims, the war each fought would have been worthwhile. As things turned out it wasn’t, but in 1939 and 1941 respectively it looked to many leaders in both countries as if they could pull it off. It wasn’t impossible that they could have, if they had run the war differently.