1. Preheat the oven to 400°F. Melt the butter in a 1-quart saucepan over moderately high heat. Add the onions, and cook, stirring occasionally, for 3 minutes, or until they begin to soften.
2. Blend in the flour, and cook, stirring, for 30 seconds. Add the milk, salt, and pepper, stirring constantly. Bring to a boil, lower the heat, and simmer for 1 minute, stirring frequently.
3. Arrange the eggs in an ungreased 9-inch pie pan. Pour the sauce over the eggs and mix gently. Sprinkle the cheese over the top and bake, uncovered, for 10 minutes. Place under the broiler about 3 inches from the heat. Broil for 4 to 5 minutes to brown.