Eh, I wouldn't make too much of that. A flagship is whatever is needed. The US Asiatic Fleet CinC flagship in the inter-war years was always a cruiser. Admiral Spruance as Commander 5th Fleet in WW2 preferred the cruiser Indianapolis to a battleship or carrier. The flagship of CinC US Fleet in WW2 was a converted luxury yacht. Dedicated amphibious force flagships in WW2 were transport-based, which lives on in Mount Whitney and Blue Ridge, built around command/control/communications capability rather than fighting power.
A flagship is a vessel used by the commanding officer of a group of naval ships, characteristically a flag officer entitled by custom to fly a distinguishing flag. The term also properly applies to the ship of whatever commanding officer is in charge of a grouping of ships. A third, more colloquial usage of the term can mean that the ship in question is considered an "exemplar" of the best capabilities and virtues of the force it represents. In Star Trek, the title flagship is typically bestowed on the best equipped, newest, or best known ship in the fleet. Throughout the history of the United Federation of Planets the starships Enterprise were typically considered the Starfleet flagship. ("The Icarus Factor"; Star Trek (2009); et al.)
As for "capital ship," that's a term that was useful for a time but isn't so much later on. If you look at this
ngram you can see that it really takes off in the context of 1920s naval disarmament. It meant battleships, back in the day when they were the ultimate weapon and only a battleship could take out another battleship (a torpedo might put them out of action, but probably not permanently). Because there were still some battle cruisers on the books or potentially so, they were included, too. But after WW2, with intercontinental air forces, atomic bombs and nuclear submarines, not to mention the cost of rebuilding after the war, the structure of the world's navies changed so "capital ship" wasn't really meaningful like it once was.
I completely agree. But let's examine what categories of ships we mainly have in Star Trek. There are frigates, destroyers, light cruisers, heavy cruisers, battlecruisers, battleships, dreadnoughts. So you see, Star Trek uses WW1 ship terms and in Star Trek we definitely have "pre-WW2 style navies".