Prepare the onions: Discard the outer skin and halve the onions lengthways. Retain the outer two layers as cases for stuffing. Reserve the remainder of the onions and chop for the base.
Prepare the tomatoes: Cut the tomatoes vertically in half through the core. Hollow out the tomatoes using a spoon and carefully scoop as much pulp and seeds from each tomato as you can, without piercing the skin. Lightly sprinkle a little salt in the tomato shells and turn them over to drain for 10 minutes. Deseed and chop the tomato pulp and reserve for the base.
Make the filling: Combine all the ingredients together in a large bowl. Add about 1 1/2 tsp salt and a grind of black pepper. If preparing ahead, refrigerate until ready for use.
Make the vegetable base: Heat the oil in the casserole over a medium-high heat. Add all the chopped vegetables and cook for 4 minutes, stirring occasionally. Stir in the canned tomatoes and reserved tomato pulp, hot water, sugar, and season with salt and pepper. Bring to a boil.
Cover, reduce the heat and simmer for 20 minutes or until the vegetables are tender. Add hot water as necessary.
Stuff the onions and tomatoes: Fill the cavities with the meat mixture and flatten to the level of the brim of the vegetable shells. Heat 1.25cm (1/2in) oil in a large frying pan over a medium-high heat. In batches lightly coat the filled side only with the flour then dip the floured side of the stuffed vegetable into the egg. Fry the filled side and the base of the onions until golden brown. Fry the tomatoes on the filled-side only. Drain the fried vegetables on paper towels.
To cook: On the prepared vegetable base, gently arrange the stuffed onions in the centre of the pan and the stuffed tomatoes on the perimeter, meat side up. Pour in enough hot stock to come midway up the stuffed vegetables. Bring to a boil. Cover, reduce the heat and simmer for 45 minutes or until the vegetables and meat are cooked through. Shake the pan from time to time to prevent the vegetables from catching. Add a little hot water as necessary.
To serve: Preheat the oven to 200°C (400°F). Place the rack in the top third of the oven. Put the casserole uncovered in the oven for the tops of the vegetables to brown lightly. Usually 15 minutes is enough but keep watching. Serve hot in the casserole or, using a slotted spoon, carefully lift the stuffed onions and tomatoes out of the pan. Pour the vegetables and tomato sauce on to a large platter with a rim and top with the stuffed vegetables. Serve with a Spanish fried rice pilaf. Enjoy this mellow prepare-ahead family meal!