Preheat the oven: Preheat the oven to 400°F and lightly grease a 9x13-inch baking dish with cooking spray or butter.
Brown the beef: Heat a large skillet over medium-high heat and cook the ground beef with the diced onion and minced garlic, breaking the meat into crumbles, until no pink remains, about 7 minutes. Drain any excess fat.
Build the filling: Stir the cream of mushroom soup, sour cream, corn, green chiles, salt, and pepper into the skillet. Cook for 2 to 3 minutes until the mixture thickens and turns creamy.
Spread into the dish: Pour the beef mixture into the prepared baking dish and spread it into an even layer with a spatula.
Add the first cheese layer: Sprinkle half of the shredded cheddar cheese evenly over the beef mixture so it melts into the filling as it bakes.
Arrange the tater tots: Lay the frozen tater tots over the cheese in a single, tight layer, pressing them gently so they sit flat and touch the filling below.
Bake uncovered: Bake the casserole uncovered for 25 minutes, until the tots start to turn golden around the edges.
Add remaining toppings: Remove the dish, scatter the remaining cheddar cheese and crumbled turkey bacon over the tots, then return to the oven for 5 to 10 more minutes.
Check for doneness: The casserole is ready when the tots are deep golden brown with crisp edges and the cheese bubbles at the corners of the dish.
Rest before serving: Let the casserole sit for 5 minutes so the layers set, then garnish with chopped green onions if using and serve warm.