Preheat your oven to 350 degrees F and grease a 9×13 casserole dish.
Brown the ground beef in a large skillet, breaking up the beef with a spatula as it cooks to make small crumbles.
Mix the ground beef and tomato sauce in a large bowl.
Cover the bottom of the casserole dish using 5 of the ham slices. They should overlap a little.
Sprinkle the ground beef and marinara mix over the ham, covering the bottom of the pan completely as well. Try to make the beef as even as possible.
Sprinkle 1 ½ cups of the mozzarella and ½ cup of cheese over the ground beef layer.
Top the cheese with another layer of ham, followed by another layer of ground beef and then top with the remaining cheeses.
Place the pepperoni slices over the top of the casserole.
Bake for 20 minutes in the preheated oven. The cheese should be lightly browned on top and bubbling. If the casserole begins to get too dark, loosely cover with a piece of foil to continue baking without burning the cheese.