Unlike some versions of creamed spinach, here you actually taste the greens. They’re enhanced by—but not overwhelmed by—the creamy sauce.
Preheat oven to 375°F. Lightly coat an 8-inch baking dish with cooking spray. Lightly coat a large Dutch oven with cooking spray, and heat over medium-high. Add spinach in 3 batches to pan; cook each batch, stirring occasionally, until wilted before adding more, until all spinach is wilted, 4 to 5 minutes. Drain spinach in a colander; wipe out Dutch oven.
Heat oil in Dutch oven over medium-high. Add onion; cook, stirring occasionally, until softened, 9 to 10 minutes. Sprinkle with flour, salt, and pepper; stir to coat onions. Stir in stock and half-and-half, scraping pan with a wooden spoon to release browned bits from bottom. Bring mixture to a boil; cook, stirring constantly, until mixture thickens, about 5 minutes. Add cheese and nutmeg; stir until smooth. Remove from heat.
When spinach has cooled enough to handle, place spinach in a clean kitchen towel and squeeze firmly over sink to remove as much liquid as possible. Add squeezed spinach to cheese mixture, and stir to combine.
Spoon spinach mixture into prepared baking dish. Bake at 375°F until set, about 20 minutes. Sprinkle with hazelnuts, and bake until hazelnuts are warmed through and golden, about 5 minutes. Remove from oven; let stand 10 minutes before serving.