Try getting your facts straight. The Japanese submarine in question was the I-17 and on 23 February 1942, about 2.5 months after Pearl Harbor was bombed, the submarine fired 17 rounds from their 14cm gun at the giant Richfield aviation fuel storage tanks located behind the beach, on the bluff top. The incident became known as the "Bombardment of Ellwood". The submarine fired from a location 10 miles west of Santa Barbara, CA.

The other submarine incident was by Japanese submarine I-25 that on 21 June 1942, fired 17 shells at Fort Stevens using it's 140mm gun. The commander chose not to return fire and pinpoint their exact location for the Japanese. The tactic worked and no shell landed in the Fort but a nearby baseball field was heavily damaged. 

The only other Japanese attack on the mainland was by Japanese balloon bombs originating in the Japanese home islands. A pregnant woman and 5 children were killed when they found one of the downed balloons in Oregon.