There’s too many variables to even guess.
What kind of zombie? A Rage Zombie, a Romero ghoul, an O’Bannon brain eater, a Herbert West special, or a standard voodoo zombi? All will have different issues.
Rage Zombies will be infected with the plague, so they’re out.
O’Bannon’s and West’s will be chemically tainted - eating an O’Bannon type’s flesh is likely to turn you, and the West zombies…in the book, it’s not clear what effect, if any, the process has on living flesh (or I’m forgetting the reference)…the movies, however, it’s not healthy. Though entertaining to watch. Some West-types have the added problem of dismembered bits remaining separately animate.
Voodoo zombies, it’s a bit more questionable. It’s generally accepted that their zombiehood is chemically induced, but it’s not quite clear just what the chemicals are, so there’s no way of judging what the effect of the lingering chemicals in the flesh will be, so best to skip them.
Romero ghouls, however, are not animated by anything inherent to the zombies themselves, but rather some unknown factor in the environment - they’re likely to be as safe as any other meat, all other things being equal.
So, we’ve established that a ghoul isn’t inherently unsafe, now we need to consider the other factors, assuming we’re looking at a Romero-style zombie apocalypse.
How fresh is the carcass? Any corpse with enough brain matter left to animate will rise. So, it could be anything from a hobo who died of ebola and has been lying in a ditch for the last month, to a perfectly healthy athlete who just took a baseball bat to the face because you didn’t realize he wasn’t a zombie until too late.
In the former case…ick. In the latter case, it’s as safe as cannibalism ever is… Don’t eat the brain. The real problem is (aside from the moral dimension, but that’s going to go out the window in a zombie apocalypse, anyway)…there’s a grey area where they’ve turned to the point of inedibility, but not in a way that would be obvious, and many diseases wouldn’t present in a way that would be visible (especially in a zombie).
So, even when dealing with Romero ghouls…it’s probably best not to pull out your copy of To Serve Man, not because they’re zombies, but because they’re meat you can’t vouch for.