Place racks in upper and lower thirds of oven; preheat oven to 425°F. Mix onion, 2 Tbsp. vinegar, and a big pinch of salt in a small bowl to combine; let sit at least 10 minutes and up to 1 hour. Drain off vinegar and discard. Meanwhile, toss potatoes and 3 Tbsp. oil on a large rimmed baking sheet; arrange in a single layer. Roast on top rack, undisturbed, until browned and crisp underneath, 20–25 minutes. Turn potatoes over and reduce oven temperature to 325°F. Place cod on a small rimmed baking sheet and drizzle with 1 Tbsp. oil. Season with salt and sprinkle with za’atar. Slide onto bottom rack in oven and roast until fish flakes easily with a fork and potatoes are browned all over, about 10 minutes. Stir olives, mint, remaining 2 Tbsp. vinegar, and remaining 2 Tbsp. oil into pickled onion. Serve cod and potatoes topped with olive mixture.