US naval based air-power would have been setback a few years*. Instead of relativity quickly recapturing the outer south pacific islands, we may have moved to further support Australia from threat of invasion, and in their fight in the Pacific. It should be remembered that Japan had been at war for five year prior to the Battle of Midway, and was experiencing shortages of resources and personnel. If Japan hadn't surrendered to the US (in this hypothetical case due a US loss at Midway) it may have faced invasion from the Soviet army, after the fall of Berlin.
*As Adm. Nimitz strongly believed in a carrier based battle group it would seem unlikely that he, or the Admirals in charge of the carriers, would (engage in)/(not disengage from) the battle if the entire carrier fleet was in imminent danger of being sunk; even if this meant sacrificing ships.