Heat the oven to 375°F with a rack in the middle position. Brush a 9-by-13-inch baking dish with 1 tablespoon oil. Wrap the spinach in a clean kitchen towel and squeeze over the sink to remove excess moisture; set aside.
In a 10-inch skillet over medium, heat the remaining 1 tablespoon oil until shimmering. Add the onion and ½ teaspoon salt; cook, stirring occasionally, until softened, 5 to 7 minutes. Remove the pan from the heat.
In a large bowl, whisk together the eggs, milk and ¼ teaspoon each salt and pepper. Break apart the squeeze-dried spinach and add it to the egg mixture along with the bread, three-fourths of the cheese, the ham and onion; using a silicone spatula, stir until well combined.
Transfer the mixture to the prepared baking dish and distribute in an even layer. Sprinkle the remaining cheese on top. Cover with foil and bake for 25 minutes.
Carefully remove the foil, then bake until golden brown and bubbly, about another 30 minutes. Cool for at least 5 minutes. Serve warm or at room temperature.
