To some extent it depends if we can get two classes into production before the war starts, or just one.
In terms of the best ship for fighting the war in the near term, then it's almost certainly Warp 8 escort we can crank out in large numbers. Frontal torps, frontal phasers, very high manoeuvrability - these are simply the most efficient pure combatants we can build on a cost/benefit level. As much as it was a joke, I think combining that with a small medical/scientific facility would help to add value in peacetime. (A medical bay is obviously also very useful in a war.) The Selachii and Soyuz projects took place whilst we were embroiled in a war already - we may need to work harder to convince the Federation Council if we're starting the project before shots are actually fired.
In terms of the future of Starfleet, obviously it's the new explorer design. A cutting edge flagship that can eat D7s for breakfast, with the range and speed to counterattack deep into Klingon territory. We will want to give it a full set of new technologies - ideally at least one new weapon design. But as cool as this is, and as much as it's the future, if we had to pick one ship to help us fight the war, having two escorts for every explorer might be more efficient. This is certainly borne out by the Skate, Selachii and Sabre classes - there is just nothing better in terms of pure bang for your buck.
Of course if we swap it around and go for the next explorer first, then we have a situation more similar to the Sagamartha and the Selachii, or the original NX and the Skate. We start the war with our new explorer class, and then a pure combat escort enters service basically as the war starts. The cost there is potentially a long lead-up where we have only a handful of quite expensive Warp 8 ships, if the new escort does not come into service quickly enough, putting us at a serious disadvantage in operational tempo. Then again, if we do have just enough time to start building escorts before the shooting starts, then getting the explorer into service first is probably ideal because they will take much longer to build - possibly too long in wartime.