Treated like mashed potatoes—that is, steamed or boiled, then smashed—butternut squash generally disappoints, lacking texture and tasting of little beyond one-note sweetness. Comfort food, indeed. But elsewhere in the world, cooks have found ways to add both interest and tons of flavor to this otherwise simple dish.

One of our favorite examples is cassolita, a recipe that over the centuries followed the Jewish diaspora from Spain to Morocco to France, changing along the way. Early versions of the dish—whose name comes from the Spanish cazuela, the round earthen cookware common in homes and tapas bars—used greens, not squash, and spiced them warmly with cinnamon and harissa or chilies, then topped them with dried fruit and nuts.

When Jews were expelled from Spain in the 15th century, many resettled in Tétouan, Morocco, and over time the greens came to be substituted with mashed squash. Modern versions typically balance the natural sugars in the squash by adding even more flavors to the toppings—the gentle bitterness of deeply browned onions, the fresh notes of parsley, and the savory crunch of fried almonds.

“This recipe shows that people want tradition, but tradition changes slightly with what’s in the marketplace,” says Joan Nathan, who has published 11 books on Jewish cooking around the world. “The ones who went to Italy would use spinach, pine nuts and currants.”

Morocco once was home to a quarter-million Jews—the largest community in the Arab world—but tens of thousands moved to France during political upheaval in the mid-20th century. It was in the kitchen of a Paris suburb where a former resident of Tétouan taught Nathan the version she included in her book, “Quiches, Kugels, and Couscous: My Search for Jewish Cooking in France.

Nathan improves on cassolita by folding parts of the topping directly into the squash, which often is roasted or boiled separately, then mashed. We loved the way this distributed the flavors throughout. We also saw an opportunity to convert the recipe to a one-skillet stovetop dish—both for ease during times when the oven might be tied up, as well as to make the most of all the flavors in the pan.

Usually, we add salt to a skillet when sautéing onions, which draws out moisture that slows browning but increases sweet caramelization. In this case, we cooked the onions without salt, which played up the onions’ bitterness to help balance the squash’s sugars. Cubes of squash then were cooked in the browned onions with a bit of cinnamon, ensuring the vegetable absorbed all the flavors and imparted more overall savoriness.

Plumping raisins in lemon juice before mixing them in added a citrusy tartness that further cut through the sweet, and Aleppo pepper contributed mild but complex heat. Along with the fruity almonds, parsley and onions, our cassolita came out savory, satisfying and hardly one-note.