How can I improve a dish with badly cooked spices without recooking?
If there are truly offensive aromas (eg burnt smell) in there that you cannot mask with other aromas, or if there are serious textural flaws (brutally adstringent mouthfeel, unpalatably hard pieces...) the dish is beyond help.

If there are aromas missing - add aromatic seasonings, herbs, spices (probably in oil).

If the dish is too diluted (tastes watery, does not stick well to grains or bread...), try reducing it (cooking it down) or thickening it.

If aromas seem to be present but subdued, try adding fat (eg butter or coconut oil) or acid (vinegar, lemon) or sugar.

If there is too much bitter/metallic/strawy taste, it could be missing salt. Or be oversalted, ironically.

If too salty: try diluting it.

If it is too sour, add sugar; if cloyingly sweet, add an acid.

If it somehow isn't fun to eat even if all the elements are there, try adding umami (MSG, nutritional yeast, soy sauce...).