1) Combine the cherry tomatoes, spring onions, garlic, basil, and oil in a processor. Pulse the tomatoes until they are coarsely chopped, being careful not to puree. Set aside. Season the sauce with salt and pepper.
2) Place the lentils in a large saucepan of cold water. Bring the water just to the boil over high heat. Carefully drain the boiling water and rinse the lentils.
3) Meanwhile, in a heavy large saucepan over medium heat, bring the to the boil. Add the rice and return the liquid to the boil. Decrease the heat to low, cover the rice, and gently simmer without stirring for 10 minutes.
4) Stir in the lentils, onion, carrot, and celery. Cover and continue cooking without stirring until the rice and lentils are tender and the liquid is absorbed, about 30 minutes longer. Turn off the heat.
5) Sprinkle the corn over the rice and lentils and let stand, covered, for 5 minutes. Uncover and fluff the rice with a fork. Cover and let stand for 5 more minutes.
6) Preheat the oven to 180°C/Gas 6.
7) Spread 15g of the butter over a 23 by 4 by 10-cm loaf tin.
8) In a heavy, large frying pan, cook the spinach over medium heat until the it wilts, about 3 minutes. Drain and squeeze the excess liquid from the spinach. Transfer the spinach to a work surface and coarsely chop.
9) In a large bowl, gently mix the lentil mixture, spinach, 170g of the mozzarella cheese, eggs, 60g of Parmesan cheese, basil, salt, pepper, and half of the checca sauce. Spoon the mixture into the prepared pan.
10) Arrange the sliced tomatoes in a row over the lentil mixture. Sprinkle with the remaining mozzarella and Parmesan cheeses. Dot the top with the remaining butter.
11) Bake uncovered until the loaf is heated through and the topping is melted and starting to brown, about 30 minutes. Let cool for 15 minutes. Slice the loaf into 5-cm slices, arrange on plates, and serve with the remaining checca sauce.