In a pot of boiling, salted water, cook the pasta according to package directions, under cooking by a minute.
Meanwhile, preheat the oven to 350 degrees . Grease a 1-qt. baking dish. In a large bowl, whisk together the eggs, milk, ketchup, mustard, chile, if using, and 1 tsp. salt. Mix in 2 cups cheese and the onion.
Drain the pasta well, then toss it into the cheese mixture. Pour the mixture into the prepared baking dish and sprinkle the remaining 1 cup cheese on top. Bake until the cheese is melted and bubbly, 30 to 40 minutes. Let cool for about 15 minutes before serving.