Preheat oven to 350°F. Cook pasta according to package directions; drain and set aside.
Meanwhile, heat oil in a medium saucepan over medium heat; add onions and garlic and sauté 2 minutes. Add beef and cook until browned, breaking up meat with a spoon as it cooks about 3 to 5 minutes; drain off any fat and set the pan back over medium heat.
Add the oregano, basil, thyme, salt, and pepper. Cook about 2 minutes. Add tomatoes and mushrooms and bring mixture to a boil; reduce heat and simmer for 5 minutes.
Spoon a small amount of beef-tomato mixture into bottom of a 4-quart casserole dish (just enough to cover surface); top with half of the cooked pasta. Next, layer with half of remaining beef-tomato sauce and half of the mozzarella cheese. Layer with remaining pasta and then top with remaining beef-tomato sauce; sprinkle with remaining mozzarella cheese. Bake until cheese is golden and bubbly, about 30 minutes. Cut into 6 pieces.
Notes
Entire recipe makes 6 servingsServing size is 1/6th of the dish