Preheat your oven to 350°F (175°C).
In a skillet, add a little oil and sauté the chopped onions and mushrooms over medium heat until softened, about 5 minutes. Set aside to cool.
In a large mixing bowl, combine the ground beef, breadcrumbs, sautéed onion and mushroom mixture, milk, eggs, Worcestershire sauce, garlic powder, dried thyme, salt, and pepper. Mix until just combined.
Add half of the shredded Swiss cheese to the meat mixture and fold it in gently.
Transfer the meat mixture into a meatloaf pan and shape it into a loaf.
Spread the ketchup evenly over the top of the meatloaf.
Bake in the preheated oven for 1 hour, or until the internal temperature reaches 160°F (70°C).
For the last 10 minutes of baking, sprinkle the remaining Swiss cheese on top of the meatloaf and return it to the oven to melt.
Let the meatloaf rest for 10 minutes before slicing and serving.