Preheat oven to 375°F (190°C). Lightly grease a 9×13-inch baking dish.
Heat olive oil in a skillet over medium heat. Brown ground beef, seasoning with salt and pepper. Drain excess grease.
In a bowl, whisk together cream of mushroom soup and milk until smooth.
Layer half of the sliced potatoes in the baking dish. Top with half of the beef and half of the onion. Spoon some sauce over the layer.
Repeat layers with remaining potatoes, beef, onion, and sauce.
Cover tightly with foil and bake for 50 minutes, or until potatoes are tender.
Remove foil, sprinkle with cheese if using, and bake uncovered for 10 minutes until melted and lightly golden.
Rest 5–10 minutes before serving.