Divide the spinach between six individual baking dishes (make sure the dishes are safe to use from the freezer to the oven). Spoon over the beans and tomatoes and drizzle with the oil. Scatter over a little of the lemon zest and squeeze over some juice, then season well. Toss everything together with your hands, like you would a salad.
Mix the soft cheese and pesto together in one bowl, and the breadcrumbs, parmesan and pine nuts in another. Season the salmon fillets and lay one in each dish, then spread the soft cheese mix over the fillets. Scatter with the cheesy breadcrumbs, pressing onto the salmon (it’s okay if it also gets on the veg and beans a little).
If you want to cook straightaway, heat the oven to 200C/180C fan/gas 6 and bake for 20-25 mins, or until the salmon is cooked through and the crumbs are golden.
Alternatively, cover the dishes well and freeze for up to two months – it’s a good idea to write the name of the dish and the cooking instructions on the lid. To cook from frozen, uncover and bake for 30-35 mins at 200C/180C fan/gas 6.
Serve the gratins with some crusty bread for mopping up the juices, if you like.