Grease a 9x13 baking dish with butter.
Line a strainer with a thick paper towel or cheesecloth. Place the thawed spinach in a the strainer and wrap it in the paper towel before squeezing as much water from it as possible. Once the spinach is drained finely chop it (if needed).
Heat a large skillet over medium heat and add butter and onions. Saute until onions soften.
Place spinach in the pan and toss with the onions and butter. Remove from heat and set aside.
In a large bowl combine the bread cubes, ham cubes, Gruyere cheese, Parmesan cheese, and spinach and onion mixture. Toss everything together until well-mixed.
Pour the bread mixture into the greased baking dish.
In the now empty bowl add the eggs, milk, mustard, salt, and pepper. Whisk together until fully combined.
Pour the egg mixture over the bread mixture in the baking dish. Cover the dish with plastic wrap and place in the refrigerator overnight (8-24 hours).
When ready to bake the strata remove it from the refrigerator and let sit our for about an hour.
Preheat oven to 350 degrees F.
Bake uncovered for 45-60minutes or until puffed, golden brown, and cooked through. If using an instant read thermometer the internal temperature in the center should be 165 degrees F.
When it has finished baking remove from the oven and let stand for 15-20 minutes before serving.