Roast: Preheat oven to 425°F (218°C). Cut most of the tough root from each endive, leaving just enough to keep the endive intact. Cut each in half lengthwise and arrange cut side down on a baking sheet. Drizzle with olive oil, rubbing to evenly coat. Roast for 30 minutes, or until fork-tender.
Bechamel: Melt butter in a medium saucepan over medium heat. Add the flour, whisking to combine, and cook for about a minute. While whisking, slowly pour in the milk. Once fully incorporated, increase heat to reach a gentle simmer until sauce thickens. Stir in salt, cayenne, and half of the gruyere.
Assembly: Into a large casserole dish, layer a third of the bechamel sauce, then tightly pack in the cooked endives. Top evenly with remaining bechamel and sprinkle with the cheeses.
Broil: Set oven to broil and place pan on the middle rack. Broil, watching closely, until cheese is melty and golden.