I hope I don't catch a lot of flak for saying that "flak" is the appropriate spelling for an attack or opposition, and "flack" is a person who specializes in publicity.

Hard to imagine they'd get confused, then, but I think English speakers don't like the odd c-less spelling of flak. That makes sense, because "flak" is German, and unusual German at that. It's an abbreviation of Fliegerabwehrkanone (anti-aircraft guns), so it was adopted into English from WWII, and became metaphorical sometime thereafter. For another literal use, think "flak jacket."
But if you don't like the flak spelling, fear not: Merriam-Webster already lists "flack" as an alternative spelling for the same meaning. I kind of like the quirky original myself, which is why I'm a flack for it. (See what I did there?)