Peel the onion and the clove of garlic. Core and wash the pepper. Finely dice everything. Drain the corn.
Heat the oil in a saucepan and sauté the onion and garlic cubes. Add the tomatoes, cream and pesto, puree everything finely. Bring the sauce to the boil and season with salt and pepper.
Mix the tortellini, corn and pepper cubes and place in a baking dish, pour the sauce over them. Cut the mozzarella into slices and cover the casserole with it.
Bake the casserole in a preheated oven at 200 ° C for about 20 minutes.