Soak the dry white beans overnight. Rinse and put into a large pot of water to boil until cooked.
Meanwhile, brown the onion in olive oil in a large pot, add pumpkin, cooked beans, water in which the beans boiled, salt and pepper, and boil until pumpkin is done.
In a small bowl, chop the fresh coriander, add the olive oil and reserve. Lightly cook the spinach and cool in iced water. Drain well.
Roll the flaky pastry out with a rolling pin. Spread it with the cooked spinach, roll tightly, brush with beaten egg yolk and bake in a hot oven (170ºC) for 10 minutes. When cooked, cut into 2cm-thick slices.