So... what would combat vessels in the starry sea actually look and be shaped like? I think most science fiction does a lousy job of this.
It seems to me important to ignore two things: first, atmospheric reentry capability, and second, any manner of warp drive. Building major warships with atmospheric capability seems unlikely to me because putting large ships into space is ridiculously expensive in terms of rocket fuel. I think space elevators and assembly in orbit are plausible within the next 200 years, at which point you never really need atmospheric capability. If you need to put something on the ground from orbit, use a dedicated small reentry vehicle (dropship) with the knowledge that it's probably a one-way trip unless you're willing to drop a ton of fuel to go with it or unless you've captured an elevator.
(There are probably some good thoughts to be had on the strategic importance of space elevators in orbital war if they're an assumption you're willing to make. I think, though, of all the possible means to make achieving orbit common enough for most science fiction, the space elevator is the most plausible / scalable)
On the flip side, if you prefer to assume Traveller-style "free" multi-g reactionmassless acceleration in any direction, then you still don't really need to take aerodynamics into account - just strap more antigrav plates onto a hull built in a configuration actually reasonable for use in space, disregard lifting surfaces, and vector your thrust however you like. This does get harder on planets with higher gravity, though. Maybe an aerodynamic 'spaceship sabot', like a pair of droppable wings... ?
Second, warpdrive. Alcubierre drive nonwithstanding, if you're willing to assume warpdrive, you can use that as a justifying assumption for pretty much any starship geometry you like. "Oh, warp drive only works on ships shaped like donuts because technobabble." But if that's the case, optimal starship geometry without warpdrive will still be a worthwhile question, because you can build your interstellar carriers as toroids and then launch ships of more practical configurations on your arrival.
So! Assuming rocket propulsion, orbital assembly / no atmospheric operation, and no weird warpdrive constraints, what's a reasonable combat starship look like?
I think the two main things to consider are moment of rotational inertia and target profile. Assuming uniform density, a sphere minimizes rotational inertia and presents a uniform target profile from all incoming vectors. If you're willing to put maneuvering thrusters out on extended arms or booms, you could get a lot of extra torque and a sphere could be very maneuverable (such booms do present exposed targets, though, and it's true that you could put boomed maneuvering thrusters on most any shape). A sphere also gives you potentially pretty broad traverses on turreted weapons, and turrets on half your surface area can aim at any single point. As you reduce your target profile in any single dimension by flattening / smushing the sphere, your moment of inertia starts going up if you want to maintain the same volume. The classical "flying saucer" pattern presents a small target from two sides and a large target from the third, and has tolerable rotational inertia depending on how flattened it is. Bringing weapons to bear from a large portion of your hull is tricky, though. The cone deserves mention, because while it has a pretty bad moment of inertia, a narrow cone presents a small target from the wherever it's pointing at and also provides a nice sloped area where one could mount forward-facing weapons that do not block each other's lines of fire. Conical ships are also susceptible to raking fire from the direction they face, though (depending on your assumptions about penetration capabilities of weapons). Cylindrical ships have slightly better moments of inertia than conical ones and smaller target profiles in their favored direction, but lose out on usable surface area for mounting terraced turrets and remain susceptible to raking fire.
Uniform density is a silly assumption, of course. Armor is probably dense, so you're likely to have sort of "worst-case" moments of inertia. Spheres still win, though. There's also an interesting conundrum in terms of reaction mass, ammunition, and other expendables - if you put them near the outside of the hull, then as you burn through them your moment of inertia falls more rapidly than if they were closer to the center of mass, so you gain more maneuverability as you burn through them. On the other hand, if your fuel is kept near the exterior of your hull, it's more likely to be hit and then you will be sad and/or dead.
Anyway. Once aerodynamics are out of the way, spheres make a lot of sense for low-orbital environments, where orbital period is low and the horizon is relatively close so an enemy can approach from a wider variety of vectors with less warning, and therefore maneuverability and uniformly small target profile are useful. Ships designed for intercepting in interplanetary space, on the other hand, might make more sense as cones - if the enemy is on a long trajectory that they can't really alter (or they'll miss their target planet), then you can reasonably make an intercept, but you'll spend a lot of time closing while both sides know where the other is, at which point having a small target profile in one direction is useful and maneuverability is less important. Cylinders continue to make sense for missiles and other impactors intended for large, less-maneuverable targets.