To the extent they were able, the Japanese did their best to strike at the U.S. mainland throughout the Pacific War. However, that was a very limited extent. The attack on Pearl Harbor was already conducted at the absolute limit of the Imperial Japanese Navy's power projection range. The attack on Pearl Harbor required multiple--quite risky--underway refueling actions, and in certain stages of the planning, the Japanese considered having to abandon ships mid-Pacific due to range limitations. As such, the idea of a repeat performance of Pearl Harbor, only this time against Seattle, San Francisco, Los Angeles, or San Diego was well beyond the IJNs logistical capabilities to support. Even the Midway operation was a stretch for Japanese war time logistics.
That being said, the Japanese were well aware of the value of being able to attack targets on the U.S. mainland. There were multiple major targets quite near the coast, including oil production facilities in Southern California, as well as shipyards up and down the coast. As was demonstrated by the successes of the German navy's submarine in Operation Drumbeat, early in the war, U.S. coastal defences--especially against submarines--were quite inadequate. Japanese submarines were active off the Pacific coast, and made a number of attacks against shore installations. This included the bombardment of the Ellwood oil field in southern California, the bombardment of a lighthouse in British Columbia, and the bombardment of Fort Stevens at the mouth of the Columbia River. Given that each of these bombardments was carried out by a single submarine with a relatively light deck gun, they unsurprisingly inflicted relatively little physical damage, but were effective in causing panic and fear along the west coast that further Japanese attacks were incoming.
The bombardment of Fort Stevens in June 1942 coincided with perhaps the closest the Japanese would come to striking at the U.S. mainland with the launch of the Aleutians Islands campaign. Japanese forces would seize the two most outlying of the Aleutians (Attu and Kiska), but would also launch an air raid on Dutch Harbor, further up the Aleutian Islands chain. While the Japanese had seized other American territories in the Pacific (including the Philippines, Guam, Wake Island, and others), the attacks on the Aleutians are worth mentioning here as they were--technically--attacks and seizures of territory on the American continent, rather than an island in the Pacific or Asia.
The Japanese also experimented with the use of submarine aircraft carriers as a tool for launching air raids against the U.S. mainland. The Japanese constructed several submarine types capable of launching a small number of seaplanes for covert air raids, ranging from the Type B1 submarines, carrying a single seaplane to the massive I-400 class, which could carry three specially designed attack planes. I-25 of the Type B1s would launch a pair of small air raids dropping incendiary bombs on forests in Oregon, with the goal of igniting a large forest fire. The I-400s were meant for a more ambitious goal: an attack on the Panama Canal locks to close the canal for American shipping. The attack was planned, but before it could be carried out, the fall of Okinawa re-directed the submarine carriers to attacks that'd have more immediate impact. A similar plan for these vessels to drop bioweapons over San Diego or Los Angeles was also under development, but the war ended before it could be carried out.
Finally, there are the famous 'balloon bombs' or 'Fu-Go', which--much like I-25's air raid--sought to drop incendiary bombs of the vast forests of the Pacific northwest to ignite large scale forest fires. The weapons themselves were quite ingenious, riding the jet stream and with a system of relief valves and droppable ballast to keep the balloons at the right altitude. Indeed, many of these weapons did in fact make it from their launch sites in Japan to the continental United States but to little actual effect. One bomb managed to kill 6 civilians near a small Oregon town in the only casualties of the campaign, while another--in the most impactful event--managed to briefly knock out power for the Manhattan Project's Hanford site.
Thus, the short answer to your question is that the Japanese did attack the American mainland to the best of their ability during World War II. However, that ability was exceptionally limited to only light shelling of isolated targets or other experimental methods of attack. However, limited ability to sustain a fleet of any size across the expanses of the Pacific meant that these were the only real attacks the Japanese could make.