Coarsely grate the gruyere and cheddar, and finely grate the parmesan.
Heat a large saucepan or pot on medium heat. Sautee onions with chili flakes until translucent and slightly caramelized, about 15-20 minutes. Add the flour and cook until no flour is left and mixture forms a thick paste.
Add the milk and stir with a whisk to incorporate.
Mix all the cheeses in a bowl, then reserve 1/2 cup of the mixture and set aside. Add to the saucepan, stir and cook until the milk and cheese mixture becomes thick and forms a cheese sauce.
Meanwhile, boil the noodles in a large pot of water. Cook until al dente, then strain.
After the cheese sauce becomes thick, add the noodles, and stir to combine. Then pour into baking dish and sprinkle the remaining 1/2 cup of cheese on top.
Bake in pre-heated 400 F oven until the top becomes golden brown.