Preheat your oven: Begin by preheating your oven to 350°F (175°C). Line a 9×5-inch loaf pan with foil for easy lifting later on.
Caramelize the onions: In a large pot, heat 2 tbsp of olive oil over medium-high heat. Add 2 lbs of thinly sliced yellow onions and 1/8 tsp of baking soda. Cook for about 15 minutes, stirring occasionally. The goal is to achieve a deeply golden brown color, which may take an additional 10-15 minutes of stirring.
Prepare the meatloaf mixture: In a mixing bowl, combine 1/2 cup of plain dried breadcrumbs and 1/2 cup of milk. Add the caramelized onions (reserve some for garnish), 2 cloves of minced garlic, 2 tsp of Worcestershire sauce, 1 1/2 tsp of kosher salt, and 1/4 tsp of ground black pepper.
Combine ground meat: Carefully incorporate 2 lbs of ground beef and 2 beaten large eggs into the mixture, being sure not to overmix.
Transfer to the loaf pan: Once mixed well, transfer the meat mixture into the prepared loaf pan. Press it down evenly so it bakes uniformly.
Bake the meatloaf: Place the loaf in the oven and bake for 55-60 minutes. You want the internal temperature to reach 165°F (74°C).
Broil for the finishing touch: After baking, switch the oven to broil. Sprinkle the reserved caramelized onions and 1 cup of shredded Gruyère cheese over the top of the meatloaf. Broil for about 2 minutes until the cheese is bubbly and slightly browned.
Cool and slice: Allow the meatloaf to cool in the pan for 15 minutes. Once cooled, carefully lift it out using the foil and slice on a cutting board.