A locally armed militia would have been vital if we had lost the battle at Midway and the Japanese invaded Hawaii. The military would've given some hasty training to the militia and it would supplement the army. It's questionable if the defense force could have held out against Japanese naval and air attacks.
Questions I have are...
American's have a rebellious and strong fighting spirit especially when faced with torture, starvation, and execution by the Japanese. Would the immigrant and Hawaiian population have that same attitude to fight?
How many people owned firearms?
Stuff like isn't going to happen in America again. If the American economy and military collapses and an invasion were to occur decades later, we'd be facing robots, drones, and get hit with stuff beyond visual range making firearms useless.
In the case of Hawaii, IF the Japanese forces had landed on Hawaii, I don't think the Hawaii populace would have lasted very long. That's a big IF and includes a lot of the 50/50 things on the attack at Pearl Harbor going the other way. That said, an interesting point (or theory) is that Yamamoto and others felt that attack on the Japanese mainland was folly. That Japan didn't have the material or industry sufficient to sustain a campaign that far away from home. That the steel embargoes had hit hard and that what started as a war for more control in Asia, leadership in Japan got ahead of themselves and wanted to hit the home run. So Yamamoto's attack on Pearl was somewhat of a way of following orders while he believed very little success, or at least very little success after that IF that attacked had gone his way.
Another is that the Japanese forces never meant to reach the west coast. That the war for them in the Pacific was intended to expand into the islands around Japan. That the attack on Pearl was intended to be more of a distraction or maybe that that was as far as the Japanese forces meant to go, at least initially.
All stuff I read and I have no idea what is true, what is opinion, etc. But the above scenarios made sense to me upon first reading into the history. Like many things about WWII and wars in general, it all depends on whose account one reads.
While I too don't see an invasion of America like presented in Red Dawn, who knows. It could happen after a weakening. Like you mentioned in an economic collapse, or an EMP scenario like in One Second (or Year) After.