In a large skillet over medium heat, melt 2 tablespoons butter. Add onion, and saute until it begins to soften, about 4 minutes. Add bell pepper and mushrooms, and cook until softened and most of the liquid has evaporated, about 8 minutes. Season with 1 teaspoon salt and 1/4 teaspoon pepper. Set aside to cool.
Prepare an ice bath: Fill a large bowl with ice and water; set aside. Bring a saucepan of water to a boil. Add beans, and cook until bright green and just tender, 4 to 5 minutes. Drain, and plunge into ice bath to stop cooking. When cooled, toss drained beans with mushroom mixture; set aside.
Melt the remaining 4 tablespoons butter in a medium saucepan over medium-low heat. Add 1/4 cup flour, whisk constantly until mixture begins to turn golden, about 2 minutes. Pour in milk, and continue whisking until mixture has thickened, about 3 minutes. Stir in cayenne, nutmeg, and the remaining teaspoon salt and 1/4 teaspoon pepper. Remove from heat, and let cool to room temperature, stirring occasionally. Pour over beans, and toss to combine.
Butter a 9-by-13-inch glass or ceramic baking pan. Spread half the green-bean mixture over the bottom. Sprinkle on half the grated Parmesan, and spread with the remaining green beans. Combine the remaining Parmesan and the breadcrumbs, and sprinkle over casserole. Cover with foil, and refrigerate until about 45 minutes prior to serving. You may prepare to this step and refrigerate for 2 days prior to finish and serving.
Heat canola oil in a medium skillet over medium-high heat. Toss shallot rings with the remaining 2 tablespoons flour. Fry the shallots in batches, turning frequently, until golden brown. Transfer to paper towels to drain. Set aside.
Preheat oven to 350F degrees. Cook casserole covered in the foil, for 25-30 minutes, until heated through. Remove foil. Mix saute'd shallots with approximately 1 cup of the canned or packaged fried onions. Sprinkle on top of casserole, reduce heat to 325F and cook another 10 minutes.