Preheat oven to 400 degrees F. Spray a 3 quart baking dish with cooking spray.
Heat a large nonstick skillet over medium heat. Cook the crumbled sausage in the skillet, until cooked through (5 minutes). Transfer to a pile of paper towels and pat some of the grease off. Set aside. Wipe the skillet clean.
Bring a large pot of salted water to a boil (for the pasta). While you are waiting for the water to boil, in the same skillet, heat oil over medium high heat. Add onions; saute until soft (5 minutes). Add garlic; saute for 1 more minute. Add mushrooms and rosemary. Cook until the mushrooms begin to give off liquid (3 minutes). Stir in tomatoes and their liquid, wine, and reserved sausage. Bring to a simmer and cook (uncovered) for 5 minutes. Season with salt and pepper. Cook and drain pasta according to box directions.
Toss pasta and sauce together. Spread half of the pasta mixture in the prepared baking dish. Dot with spoonfuls of ricotta and top with the remaining pasta. Cover with aluminum foil and bake for 20 minutes.
In a small bowl combine breadcrumbs, Parmesan, and salt and pepper. Sprinkle breadcrumb mixture over the pasta and continue to bake, uncovered, until the top is browned (10 minutes).