The question of resources was a major underlying factor in what drove Japan's aggressive stance and action in the Pacific and East Asia. While oil is usually touted as the foremost resource in question, issues such as steel production were as important, if not more so, than oil.
I am not going to comment on Germany, as that is well outside my area of expertise. However, in Japan's case, its expansion and desire for empire was not solely about oil, but rather, oil was a small portion of a much more deep set goal for the Empire. Indeed, at the time of the American oil embargo in the summer of 1941, the oil cut off was not at the absolute forefront of Japanese policy maker's minds. For quite some time before, the US had been seeking out ways to reduce oil exports to Japan, without resorting to a full embargo, via various export restrictions related to the US's own military build up. Of equal or greater concern was the steady closing off of export options for machine tools, chemicals, specialty alloys, and other such goods from the US, as well as the asset freeze, which crippled Japan's ability to acquire further resources on the international market (what little of an international market that was left, given the war in Europe).
However, all of this is ultimately secondary, because while the asset freeze and full oil embargo may well have been the final straw that convinced Japanese leadership that the Southern Advance was their only option, the deterioration in US-Japanese relations that led the US to take such measures was only in place because of Japan's own continued aggressive warring throughout the 1930s and into the 40s. It cannot be overstated how much of a presence the War in China had for Japanese policy making. Ultimately, it was the inability of Japan and the US to come to an understanding over China that led to the increasing economic pressure placed on Japan by the US in an effort to limit further Japanese aggression, which in turn led Japan to striking South, and going to war with the West.
Yet how did we get to the War in China? It was not a war that many Japanese policy makers wanted. In the aftermath of World War I, the lesson Japan took away was that any future war would be a total war. Prior to World War I, Japanese war planning tended to assume that--whoever Japan was fighting--there would be neutral powers available for trade and loans in order to provide both the resources and financing that Japan lacked domestically. Moreover, the war would likely be short, completed while Japan had reserves of resources to rely upon. Yet, World War I had seen what was arguably the world's preeminent industrial power, Germany, completely cut off from wider international markets, and forced to slowly wither away, its advanced industrial base starved of resources over a long, attritional war. How to deal with this threat would form the core of Japanese foreign and even domestic policy throughout the interwar period, and the proposed solution was autarky: a Japan that would not be vulnerable to interruption of international trade, and could support a full war economy on its own resources.
In the late 1920s, the Cabinet Resources Bureau conducted a series of studies and exercises to develop a full scale mobilisation plan, that would determine what wartime demand for resources would be, and how Japan could meet those demands. While the plan was never fully drafted (its calculations would be thrown off by the Mukden Incident in 1931), early studies had shown that if Japan was to support a war economy, it could not limit itself to domestic resources in Home Islands and Korea. Access to additional resources would have to be acquired, and nearby Manchuria was the first goal. Manchurian iron deposits could become desperately needed steel, while coal deposits offered the prospect of synthetic oil for the Navy. While the Japanese had long had a strategic interest in Manchuria, seeing it as vital to securing their continental flank against Russia, the need for resources deepened the interest in controlling Manchuria economically, not just the strategically key railways. As Chiang Kai-Shek's efforts to unify China under the Kuomintang banner came closer to fruition, and it became clear that he would not be willing to grant Japan the economic concessions in Manchuria they desired, the Kwantung Army took matters into its own hands, and occupied Manchuria on its own authority.
The occupation of Manchuria, in turn, sparked Japanese interest in northern China as a whole, both to secure their new critical resource base in the puppet state of Manchukuo, but also for further sources of potential resources. To this end, the Army supported efforts to create either a wholly independent northern Chinese state that would be susceptible to Japanese domination, or at least an autonomous north with substantial economic concessions. This led to a continued intermingling of Japanese and local Chinese forces, while heavy handed Japanese rule increased Chinese distaste for Japan, while the Army's typical response strategy of massive response to every threat to "show strength" laid the groundwork for a minor skirmish at the Marco Polo bridge in 1937 to escalate into a full scale war. In its efforts to "bring an end to the war", the Japanese often sought to expand it, committing more troops to the ongoing struggle in the north, landing an invasion force at Shanghai, and eventually the occupation of Indochina, all to try and "end the war".
An interesting note throughout this whole process was how those total war planners in Japan were constant advocates for maintaining peace with the West. These total war planners sought to try and stabilize the situation in China, both to secure Manchukuo's southern flank in the even of war with the Soviet Union, but also to prevent a war that would drain resources at the same time as Japan was seeking to build up its industrial base.The US in particular was a critical source for technology, capital goods, and other necessary materials to establish an expanded Japanese industrial base that could support an autarkic total war economy, and development of economic concessions in northern China could be a vital resource for further economic development. To go to war with China held the potential to completely derail Japanese development plans, if the war dragged on. And drag on it did.
The war in China thus presented an almost insurmountable quagmire for Japan. The Army would not countenance withdrawal, arguing that this would be showing weakness that would only lead to future incursions. It was also draining the Japanese economy, as resources meant for further industrial build up were pulled into more immediate needs for supplying the War in China, and the United States became increasingly hostile. Moreover, the outbreak of the war in Europe in 1939 further worsened the situation, as prices for key materiel vital to war industries increased due to European demand, and the United States tightened up its export control regime to retain resources for its own military buildup. Simultaneously, the US wished to place economic pressure on Japan, hoping that such pressure would lead to a restoration of more moderate civilian leaders, rather than militarists, with whom the US could then negotiate with. Japanese demands for an almost exclusive economic zone in China, including recognition of Manchukuo were incompatible with US goals of maintaining the Open Door policy, and this incompatibility proved an immovable stumbling block in the continued US-Japanese negotiations that would ultimately culminate in the attack on Pearl Harbor.
So, to sum up, while economic and resource concerns loomed large in the mind of Japanese policy makers, it was not the only issue at stake. This analysis has focused primarily on physical resources and military policy, but issues of currency reserves, balances of trade, Japanese exports, as well as an incredibly important cultural aspect all played a part in shaping Imperial Japanese policy in the lead up to the outbreak of World War II. Resources availability and access to resources was a major concern for Japan, that was a major part of it stumbling into the China War, which in turn led to the steady deterioration of relations culminating in the outbreak of the wider Pacific War.
I hope this has helped answer your question. Please feel free to ask any follow ups.
Sources
Michael A. Barnhart, Japan Prepares for Total War: The Search for Economic Security, 1919–1941
Edward J Drea, Japan's Imperial Army: Its Rise and Fall, 1853-1945
Stuart D. Goldman, Nomohan: The Red Army's Victory Which Shaped World War II