Preheat the oven to 450°.
Combine the ham and broccoli in a sprayed 9x13 baking dish.
In a saucepan, saute the onion in butter for 3 minutes. Whisk in the flour, garlic, salt & pepper until blended well and the mixture is smooth.
Gradually add the milk 1/2 cup at a time, whisking until smooth with each addition. Bring to a boil and cook for 2-3 minutes until thickened. Stir in the Parmesan and cheddar cheeses until melted.
Remove the sauce from the heat and pour over the ham and broccoli mixture. Mix well so all the ham and broccoli is coated.
Top the mixture with frozen tater tots and bake at 450° for 30 min. Turn the oven to broil and broil for 3-8 minutes, watching closely, until tater tots are the desired crispiness.
Allow to rest for 10 minutes before serving so the mixture can thicken.