Preheat oven to 350°F. This casserole can be made in any kind of dish as long as it holds 3 quarts. If using a 13x9-inch casserole dish, lightly spray with cooking oil and set aside.
Slice the zucchini in half lengthwise and remove any large seeds. Grate the zucchini, peel and flesh, and put it in a colander to drain while preparing the remaining ingredients.
Slice 4 of the jalapeño peppers in half, set aside. Remove the seeds and membrane from the last jalapeño and chop fine. Set aside.
Place half the shredded zucchini on a clean kitchen towel. Gather the edges together and twist to tighten the zucchini into a ball. Squeeze tightly over a sink to remove any moisture. You will need to squeeze several times. Continue with the remaining half of shredded zucchini removing as much of the water as possible.
Heat a skillet on medium-high on the stove top (this can be your cast iron skillet if using to bake the casserole). Add the halved jalapeños, cut side down. Cook until lightly charred, about 5 minutes. Remove from the skillet and set aside.
Add the butter to the skillet and reduce the heat to medium. Add the onion and cook, stirring occasionally, until lightly browned. Add the shredded zucchini to the skillet with the onions and cook until very soft and dry, about 5 minutes. Remove the cast iron skillet from the heat.
If using a casserole dish, combine the chopped jalapeño, corn, salt, ricotta, feta, bell pepper, and thyme with the zucchini in a large mixing bowl. In a small measuring cup, combine the cornstarch, baking powder, black and cayenne peppers and add to the vegetable mixture. Stir until well combined. Add the lightly beaten eggs and mix well. Pour into the prepared casserole.
Top the casserole with the halved, charred jalapeños, cut side up.
Bake until the center is set and the edges are lightly browned, about 40-60 minutes depending on the size of your pan. A deep skillet will take longer to bake than a 13x9-inch casserole pan. Allow the casserole to rest for 10-15 minutes before serving. Serve with your favorite hot sauce.
Store leftovers in an airtight container in the refrigerator. Leftovers warm up nicely in the microwave.