First, make the tomato sauce by sauteing the onion in a splash of olive oil until translucent. About 5 minutes. Add the crushed garlic and pinch of chili flakes and cook for 30 seconds.
Add the 2 tins of tomatoes, season well with salt and pepper, and add the stock and wine. Cook for about 30 minutes until the sauce thickens.
Add the cream cheese and stir until dissolved.
Towards the end of the cooking time, preheat the oven to 180C/350F and lightly spray or grease an oven-proof roasting dish.
Boil the ravioli and a pot of salty water according to the pack instructions. Drain in a colander, adding a splash of olive oil to prevent sticking if necessary.
Add the baby spinach & chopped basil to the oven dish, tip the cooked ravioli over that, then pour over the sauce. Toss gently to combine. If you prefer you could add the spinach and basil to the sauce before adding. it to the oven dish
Scatter over the grated mozzarella and bake covered for 10 minutes then remove the cover and bake for a further 15 minutes to brown. Scatter over the rest of the basil
Notes
The sauce can be made in advance and re heated when you cook the ravioli.