Preheat oven to 400°F (200°C). Line a large baking sheet with parchment paper.
In a large bowl, toss the zucchini and yellow squash with 1 tablespoon of olive oil, salt, and pepper. Spread them on the prepared baking sheet.
Pat the cod fillets dry. Rub them with the remaining tablespoon of olive oil, minced garlic, and dill. Season with salt and pepper.
Place the cod fillets on the baking sheet with the vegetables. Top each fillet with a few lemon slices.
Bake for 10-12 minutes, or until the cod is cooked through and flakes easily with a fork.