Preheat the oven to 350°F (180°C). Grease a 9-inch pie dish or similar baking dish with butter or oil so the quiche doesn’t stick.
If using vegetables that release moisture (like mushrooms or spinach), sauté them first in a small skillet with a little oil until tender. Cook bacon or ham if using, then set aside.
In a large bowl, whisk together the eggs and milk until they are well blended and slightly frothy. Stir in the salt and black pepper.
Add the shredded cheese, sautéed vegetables, and cooked bacon or ham into the egg mixture. Stir gently to distribute evenly.
Pour the combined mixture into the prepared baking dish, smoothing the top lightly with a spatula.
Place the dish in the preheated oven and bake for about 35–40 minutes, until the center is set and the edges are lightly golden. A knife inserted into the center should come out clean.
Allow the quiche to cool for about 5–10 minutes so it firms up and slices more easily.
Slice and serve warm or at room temperature.