Preheat the oven to 180°C (350°F). Line a baking dish, about 20 cm x 25 cm (8 inches x 10 inches) in size, with baking paper, letting it overhang the sides a little.
Line a bowl with a clean tea towel. Add the grated zucchini, sprinkle with the salt and mix together with your hands. Twist the tea towel into a garrotte to squeeze out the excess moisture from the zucchini, so you don’t end up with a watery slice. (You could use a sieve over a bowl, but you’ll have to work twice as hard.)
Wipe the bowl dry, then pop the zucchini back in, along with the onion and bacon. Using a spatula, fold the flour through.
Meanwhile, boil a kettle. Put the corn and peas in a small heatproof bowl and pour some boiling water over them. Let stand for a few minutes, then drain.
In a bowl or jug, beat the eggs with a fork until the whites and yolks are combined, then beat in the milk. Pour the mixture over the zucchini, then fold in half the cheese, as well as the corn and peas.
Pour the mixture (which will be runnier than you expect) into the baking dish. Sprinkle with the remaining cheese and arrange the tomato slices on top. Bake for 40–45 minutes, until the egg has set and the top is slightly burnished. Serve warm or cold.