Preheat your oven to 375°F. Grease a 9-inch x 12-inch baking dish and set it aside. You can use an oval dish, which has less volume, and your casserole will be a little thicker.
In a medium, heavy-bottom sauté pan, cook the cubed pancetta, diced bacon, or bulk sausage over medium-high heat until the fat is rendered and the meat is cooked through (about 3 minutes).
Remove the cooked meat from the pan, leaving behind any rendered fat. If you’ve used cubed pancetta, add 2 tablespoons of olive oil to the pan. If bacon, add just 1 tablespoon of oil.
Add the diced onion, sliced mushrooms and salt to the pan, and stir to combine.
Cover the pan and cook until the onions are translucent and the mushrooms are tender (about 5 minutes). Remove the cooked vegetables and set them aside to cool until no longer hot to the touch.
In a large bowl, place the milk and eggs, and whisk to combine well. Add the dry pancake mix and whisk until smooth.
Add the hash brown potatoes and about 6 ounces of the shredded cheese, and mix to combine.
Add the cooked and cooled pancetta or bacon, onion and mushrooms. Mix gently to combine.
Pour the mixture into the prepared baking dish. Scatter the remaining shredded cheese evenly on top.
Make Ahead Option
At this point, the dish can be covered tightly with plastic wrap and stored in the refrigerator overnight. Uncover and allow to sit at room temperature for about 10 minutes before baking the next morning.
Bake
Place the baking dish in the center of the preheated oven and bake until lightly golden brown on top, and firm to the touch (about 30 minutes).
Remove from the oven and allow to set for 5 minutes before slicing and serving warm.
Notes
For the gluten free pancake mix.If you have a favorite dry gluten free pancake mix, use that. You can use anywhere from 1 1/4 cups to 1 5/8 cups of the mix. More pancake mix will make a slightly thicker casserole. If you'd like to use my homemade gluten free pancake mix, whisk together 1 1/2 cups (210 grams) of a gluten free flour blend without xanthan gum (like our gum-free gluten free flour blend or Nicole's Best multipurpose gf flour) with 1/4 teaspoon xanthan gum, 1 1/2 teaspoons baking powder, 1/4 teaspoon baking soda, 1/2 teaspoon kosher salt, and 2 tablespoons sugar. To make your own hash brown potatoes.Wash, dry, and pierce about 2 pounds of Idaho potatoes. Place them on a microwave-safe dish and microwave on high power (or 80% power if your microwave is really high power, like 1200 watts) for 1 1/2 to 2 minutes. They should still be somewhat raw. A fork should pierce the flesh readily, but not very easily.Allow the potatoes to cool, then peel and shred on a box grater. Use as you would the frozen potatoes.