Prepare the oven and walnuts. Heat oven to 350°F. Toast walnuts in a dry skillet over medium heat for 5–7 minutes, stirring. Set aside for garnish.
Make the caramel. Melt sugar in a saucepan over medium heat until amber. Carefully pour into a flan pan and tilt to coat the bottom.
Prepare the custard. Blend eggs, condensed milk, pumpkin, spice, and salt until smooth. Strain over caramel.
Bake the flan. Set flan pan in a roasting pan. Add about 1 inch of hot water to the outer pan. Bake uncovered for 55–70 minutes, until edges are set and center gently jiggles.
Cool and serve. Remove from water bath and cool. Refrigerate at least 4 hours or overnight. Loosen edges, invert onto a rimmed platter, and garnish with walnuts.