Heat the oven to 375°F and line an 8-inch square pan with parchment.
Mix the beef, breadcrumbs, egg, milk, salt, black pepper, 1/4 cup ketchup and Worcestershire sauce just until combined.
Press the mixture into an even 1 1/2-inch-thick loaf in the pan, spread the remaining ketchup over it and bake for 35 to 45 minutes until the center reaches 160°F.
Rest the meatloaf for 10 minutes, then cut it into 6 firm rectangular slices.
Heat the oil on a griddle over medium heat and cook the onion for 8 minutes until browned; move it aside and griddle the meatloaf slices until their centers reach 165°F.
Toast the sourdough on the griddle, spread it with mayonnaise and add one meatloaf slice and browned onion to each sandwich.
Close the sandwiches and cut them once through the middle.