Preheat oven to 350°F (175°C). Grease a 9x13-inch baking dish.
Spread half of the bread cubes evenly in the prepared baking dish. Layer with ham, mozzarella cheese, and Parmesan cheese. Top with remaining bread cubes.
In a large bowl, beat eggs. Mix in milk, oregano, salt, and pepper. Pour egg mixture over bread cubes. Press the bread cubes down with a fork to ensure they are completely saturated with the egg mixture.
Bake in preheated oven for 45 minutes, or until the top is golden brown and the center is set. Let stand for 5 minutes before serving.