Preheat the oven to 400°F and lightly oil a large sheet pan. Toss the halved potatoes with 2 tablespoons of olive oil, half the salt, and half the pepper. Arrange them cut-side down on the sheet pan and roast for 15 minutes.
Meanwhile, in a bowl, combine the sliced onion, diced tomatoes, garlic, oregano, rosemary, and remaining olive oil. After the potatoes have roasted for 15 minutes, add the onion mixture to the pan, stirring gently to combine with the potatoes.
Season the cod fillets with the remaining salt and pepper, then nestle them among the vegetables. Scatter the olives around the pan and drizzle everything with lemon juice. Continue roasting for 15-20 minutes, until the cod flakes easily and the potatoes are golden and tender.
Remove from the oven and immediately sprinkle with fresh dill and crumbled feta cheese. The residual heat will slightly soften the cheese while the herbs add a fresh, bright finish to this rustic Mediterranean meal.