I'm not sure that the U.S. had underestimated the Japanese; in fact American intelligence had broken the Japanese code and were constantly intercepting messages sent from Tokyo to the Japanese ambassador in Washington. There would have been no reason to keep such a close eye on Japanese activity had the Japanese been underestimated. The code breaking program, known as "Operation Magic" had indicated that something dire was afoot. The last decoded message, indicating that the ambassadors were to deliver a final message at a precise time (actually thirty minutes before the planned attack) also indicated that they were to destroy all decoding equipment immediately thereafter. Sadly the "last" message was not delivered until after the attack was underway. Due to communication errors, a message from the War Office to all Pacific commanders to prepare for an imminent attack was also not delivered until the attack was well under way.
It is incorrect to suggest that the commanders in Pearl Harbor believed the distance from Japan offered protection. They were well aware of Japanese aggression in the Pacific basin, and a Japanese attack was considered a real possibility. Ironically, the attack was only partially successful as Admiral Halsey had steamed most of the destroyers out of the Harbor to probe the area for suspicious Japanese activity. Had the Navy not been probing, the destroyers would have been in the harbor, and likely destroyed.
There were two major reasons for the success of this Japanese attack. First, the Japanese had done a good job of planning and training for this attack. Second, and perhaps more importantly, the Americans were not ready for the attack. This was presumably due to them underestimating the Japanese. There had been warnings issued by high level military officials that an attack of some sort might be imminent. But the warning was vague enough and commanders at Pearl Harbor did not really believe that the Japanese could hit them given how far they were from Japan.