Heat oven to 350 degrees. Grease a 2 1/2-quart casserole dish. Arrange the cooked and drained broccoli in the dish.
Heat the butter in a large skillet; add onion and sauté for about 2 to 3 minutes, until onion is tender. Stir in flour until well blended and cook, stirring, for 1 minute. Add the pepper, nutmeg, salt, and half-and-half. Continue cooking over low heat until thickened. Stir in cheese and cook just until cheese is melted.
Add about 1/3 of the hot mixture to the beaten eggs; add back to the hot mixture, blending well. Pour over the broccoli. Bake for 35 to 45 minutes, until a knife inserted in the center of the broccoli casserole comes out clean.