In a saucepan with boiling salted water, cook penne for about 10 minutes or until al dente. Drain and set aside.
In the saucepan, heat oil at medium heat. Add onions, carrots, cauliflower, salt and pepper. Cook, stirring from time to time, for about 5 minutes or until veggies are tender but still crunchy. Add the reserved penne and pesto, stir to coat well.
In a bowl, with a whisk, mix eggs and cottage cheese. Add to the preparation of pasta and stir to coat well.
Put the preparation in an oven-dish that contains 2 L (8 cups) or in 4 oven-dish that contain 500 ML (2 cups) each. Press slightly. (You can prepare the gratin until this step and cover it. It will be good until the next day in the fridge and up to 2 weeks in the freezer. Let defrost before cooking and add 10 minutes to the cooking time.) Cover with slices of tomatoes and sprinkle with parmesan cheese. Cook in the preheated oven of 375 F for about 30 minutes or until preparation is golden and bubbling.