Preheat the oven to 400°F (200°C). Lightly oil a baking dish large enough to hold the fish in a single layer.
Make the tomato-olive mix: In the baking dish, combine tomatoes, olives, capers, garlic, and red onion.
Add 2 tablespoons olive oil, lemon zest, half the lemon juice, oregano, and red pepper flakes. Season with a good pinch of salt and pepper. Toss to coat.
Roast the vegetables: Spread the mixture evenly and bake for 10 minutes to soften the tomatoes and develop flavor.
Season the cod: Pat the cod dry with paper towels.
Rub with the remaining 1 tablespoon olive oil, and season both sides with salt and pepper.
Nestle and bake: Remove the dish, push the tomatoes to the sides, and place the cod in the center. Spoon some of the juices over the fish. Bake for 10–12 minutes, or until the cod flakes easily and is opaque throughout.
Finish with brightness: Squeeze the remaining lemon juice over everything.
Taste the pan juices and adjust salt, pepper, or lemon as needed.
Garnish and serve: Sprinkle with parsley. Serve with rice, couscous, or crusty bread to soak up the sauce.