Preheat your oven to 375°F (190°C). Grease a 9×9-inch or similar-sized baking dish.
In a large bowl, combine ground beef, egg, breadcrumbs, milk, onion, garlic, Worcestershire sauce, salt, and pepper. Mix until just combined—do not overmix.
Press the meatloaf mixture evenly into the bottom of the prepared baking dish. Bake uncovered for 20–25 minutes, until the meat is mostly cooked through.
Remove the dish from the oven. Carefully spread the mashed potatoes over the cooked meat layer. Sprinkle shredded cheese and bacon (if using) on top.
Return to the oven and bake for an additional 10–15 minutes, or until the cheese is melted and bubbly.
Let rest for 5 minutes before serving. Garnish with green onions if desired.