Looking back, it appears that Hitler made a monumental mistake in declaring war on the United States, but you have to remember that up until WWII, no country had ever fought a two-front war and won. The Germans were keenly aware of this and I believe Hitler thought that declaring war on the United States was a low risk move because the United States would focus exclusively on fighting Japan. Moreover, Hitler thought that by declaring war on the United States, he was encouraging the Japanese to go all out against the United States and thereby keeping the United States tied down in the Pacific, which was his goal
After Pearl Harbor, what no one expected was for FDR to focus America on defeating Germany rather than devoting all of America's resource to fighting Japan. No one, except Americans, could understand how economically powerful the United States was. And when you look from a pre-WWII perspective, it really was beyond belief that the United States was able to fight a global war on 2 fronts and win on both fronts. Simply put, that was thought to be an impossible feat.
Luckily the US had a lot of help, two fronts is a pretty daunting task.