Preheat the oven to 350 degrees F.
Grease a 9x13-inch baking dish.
In a large, deep skillet over medium-high heat, add the mushrooms and cook, while stirring them occasionally, until they are soft, slightly browned, and most of the liquid has evaporated, about 5-8 minutes.
Pour the mushrooms into a bowl and set them aside.
Carefully wipe the skillet out and place it over medium-high heat.
Add the oil and allow it to heat until it shimmers.
Add the onions to the hot oil and cook until translucent, about 6 minutes.
Add the garlic and the bell peppers to the onions and cook until the garlic is fragrant, about 1 minute.
Season the onion mixture with the salt.
Add the ground beef to the onion mixture and reduce the heat to medium.
Cook the ground beef, while crumbling the meat, until the beef is no longer pink, about 8 minutes.
Add the tomatoes and their juices to the beef mixture, then use the back of a wooden spoon to carefully crush the tomatoes.
Add the tomato paste, the oregano, the pepper flakes, and the black pepper to the beef mixture and stir to combine.
Simmer the beef mixture until it thickens slightly, about 20 minutes.
Add the mushrooms to the sauce and cook, while stirring, until they are incorporated and heated through, about 2 minutes.
Taste the sauce for seasoning and add the salt, as needed.
In a large pot of salted, boiling water, add the elbow macaroni and cook until just shy of al dente, according to the package directions.
Drain the pasta.
In the same pot used to cook the pasta, add the elbow macaroni and the sauce and toss to combine.
Add 1/2 of the cheddar cheese and 1/2 of the parmesan to the pasta mixture and toss and mix to combine.
Transfer the pasta mixture to the prepared baking dish.
Top the pasta mixture with the remaining cheddar cheese and the remaining parmesan cheese.
Bake until the sauce is bubbly and the cheese on top is lightly browned, about 30 minutes.
Let the casserole sit for 5-10 minutes.
Serve.