Preheat the oven to 350°F (175°C).
In a large skillet over medium heat, cook the diced bacon until crispy. Remove with a slotted spoon and set aside, leaving some bacon fat in the pan.
Add chopped onion to the skillet and cook until softened, about 3–4 minutes.
Stir in minced garlic and cook until fragrant, about 30 seconds.
Add the ground beef, breaking it up with a spoon, and cook until browned and no longer pink. Drain excess fat if needed.
Stir the cooked bacon back into the beef mixture, then add diced pickles if using.
In a bowl, whisk together eggs, heavy cream, sour cream, mustard, Worcestershire sauce, salt, and pepper until smooth.
Spread the beef and bacon mixture evenly in the bottom of a 9×13-inch baking dish.
Pour the creamy egg mixture over the beef layer and spread it out gently with a spatula.
Sprinkle shredded cheddar and mozzarella evenly over the top.
Bake for 25–30 minutes until the casserole is set and cheese is melted and golden.
Let rest for 5 minutes before cutting and serving.