Caramelize the onions: Heat olive oil in a skillet over medium heat. Add sliced onions and cook for 15–20 minutes, stirring occasionally, until golden brown. Remove and set aside.
Cook the ground beef: In the same skillet, cook ground beef over medium heat for 6–8 minutes, breaking it apart. Drain any excess fat and add minced garlic. Sauté for 1 minute.
Build the casserole: Add caramelized onions back to the pan, followed by uncooked rice, beef broth, Worcestershire sauce, thyme, salt, and pepper. Simmer, cover, and cook on low for 15–20 minutes until the rice is tender.
Add the cheese: Preheat the oven to 375°F (190°C). Sprinkle mozzarella and Parmesan cheese over the casserole.
Bake the casserole: Transfer to the oven (or a baking dish) and bake for 15–20 minutes until the cheese is melted and golden.
Let the casserole rest for 5 minutes, then serve warm, garnished with chopped parsley if desired.