Place the broccoli and cauliflower in a large saucepan and boil until they are tender.
Meanwhile, heat 1 tablespoon of oil in a large saucepan over a medium heat. Add the onion and cook, stirring frequently, for 5 to 8 minutes, until very soft and golden brown.
Add the flour, salt and pepper and cook, stirring, for 1 minute more. Pour in the milk and continue to stir, scraping up any browned bits. Continue to cook, stirring, until the sauce bubbles and thickens enough to coat the back of the spoon. Remove the sauce from the heat.
When the vegetables are done, remove them from the oven and preheat the grill. Transfer half of the vegetables to a grill-safe baking dish. Spread half of the sauce over the vegetables, then add the remaining vegetables and top with the remaining sauce.
Combine the oats and cheese with the remaining tablespoon of oil in a small bowl. Spread the topping over the vegetable mixture in the dish. Place under the grill until the gratin is bubbling and beginning to brown on top, but watch it closely so it doesn't burn. Leave to cool for 5 minutes before serving.