Preheat the oven to 375°F / 190°C. Lightly oil a 9 × 13-inch / 23 × 33 cm baking dish.
To make the roux, combine the flour and oil in a saucepan over medium heat.
Cook for 3 minutes, stirring frequently to prevent burning.
Remove the pan from the heat and let it cool for 1 minute. Gradually whisk in the hot vegetable broth until smooth.
Return the saucepan to the heat, bring to a boil, then reduce heat and simmer for 10 minutes, stirring occasionally, until the sauce has thickened.
While the sauce simmers, layer half of the potato slices in the prepared baking dish.
Top with the sliced red onion, then layer the remaining potatoes on top.
In a small bowl, combine the miso, Dijon mustard, and black pepper.
Remove the thickened sauce from the heat and whisk in the miso mixture until fully combined.
Pour the sauce evenly over the layered potatoes.
Cover the dish with a lid or foil.
Bake for 30 minutes, then remove the cover and bake for another 20 minutes, or until the potatoes are tender and the top is golden.