I don't think you're going to get a world without aircraft carriers, and even if you did that still wouldn't keep ground-based aircraft from hitting them. However, in spite of the mythology that grew up after World War II, battleships didn't do too badly overall in coping with aircraft. Yeah, planes knocked out battleships in port and partially manned at Taranto and Pearl Harbor. They also knocked out a British battlecruiser and a single battleship off Malaysia. Beyond that, how many Allied battleships were lost to aircraft in World War II? I specify Allied because the Allies had much better AA due to proximity fuses.
The reality is that an Allied battleship fully manned and with maneuvering room was a formidable thing for World War II aircraft to tackle. I forget which battleship it was, but one of the US ones swatted down 3 dozen Japanese aircraft in one attack, without taking ship-threatening damage. Late in the war the US was using battleships partly as floating anti-aircraft platforms to protect the carriers.
How could you get battleships lasting longer as a major seagoing weapon? First, somehow avoid the battleship moratorium that essentially stopped design and building of new battleships for ten years shortly after World War I. That cut into the battleship design expertise of the countries that took it seriously, especially Britain. Second, avoid the tonnage restrictions of the Washington naval treaty. Most of the battleships that fought in the first part of World War II were either World War I-era ships or ships that had been designed to fit within tonnage restrictions, which made them less than optimal ships. When battleships that were modern and free of those restrictions, like the Iowa-class, entered the war, battleship were suddenly fast enough to keep up with carriers and very hard to kill from the air. By that time, though, carrier advocates were in control and battleships were relegated to shore bombardment work, which they did very well at.