The Cardassian-Federation war was definitely brutal and almost certainly not very costly whatsoever for the Federation.
Most evidence in Star Trek points to the conclusion that the average Federation citizen likely care little about galactic politics. The Federation is technically a democracy, but time and time again it is shown that Starfleet really runs the show - they have huge leeway when it comes to foreign policy with pretty much no civilian oversight at all, and they control a fair amount of seats in the Federation's legislature.
Whenever the Federation has a large external threat, the civilian population probably takes notice and puts their support behind the war effort, allowing Starfleet to form vast fleets to do battle with. The Cardassians were probably a never a big threat. They were a threat to some colonies, yes, but given the vast population of the Federation, a few colonies won't exactly be swinging the vote. The war with Cardassia was probably a war pursued by some Starfleet admirals motivated by who-knows-what (pride, the desire to make the Federation seem strong, helping those colonies, outright arrogance - a good portion of admirals that we see in Trek are a bit unbalanced).
Given widespread apathy, they couldn't pursue a large-scale operation, because if they crushed Cardassia, then what? Would they occupy Cardassia? I imagine that the Cardassians would not take kindly to being occupied. Federation citizens would probably put up a fuss if news stories of terrorist attacks on Starfleet occupiers started streaming home, especially since Cardassia wasn't a major threat to the Federation. Do you genocide the Cardassians? No, the Federation wouldn't do that. Do you just crush them and leave them be? No, that would just invite someone else (Klingons or Romulans) to come in and establish themselves in the region.
The war with Cardassia therefore probably took the form of skirmishes here and there, in space and on some colonies. Cardassian tactics would allow them to keep pace with Federation technological superiority in this sort of small-scale warfare, though it probably wasn't a "small" war for the Cardassians. For those who fought the Cardassians, it would be "brutal." The Cardassians weren't exactly nice to their own people, let alone their enemies. For civilians or Starfleet members not involved in the conflict, the Cardassian War would be some distant thing that really didn't have a big personal impact.
The Cardassians are shown to be technologically inferior to the Federation by a considerably margin, and their Empire is smaller and lesser in resources (this is why they suck Bajor dry). The Federation could probably crush Cardassia if they wanted to, but