Melt butter in a large non-stick saucepan over medium heat. Add celery, onion, carrot, capsicum and thyme. Sauté until vegetables are tender, 10 minutes.
Stir in the flour until thoroughly combined. Stir in stock. Increase heat to medium-high. Add broccoli, cauliflower and onion. Bring to the boil. Lower heat and simmer, uncovered, 15 minutes. Remove pan from heat. (If making filling ahead, leave it to cool to room temperature. Cover and refrigerate.)
Preheat oven to 200°C. Spread the vegetable mixture in a 23 cm glass or ceramic pie plate. Top with cheddar. Cover with pastry (see Hint). Trim edges. (If the crust is not a lattice, cut 6 long slits in it to let the steam escape.) Place the plate on a baking tray.
Bake until pastry is golden and filling is bubbling, 25 to 30 minutes. Let stand 10 minutes before serving.