Begin by cooking the ziti pasta according to the package instructions until al dente. Drain and set aside.
In a large skillet over medium heat, brown the ground beef or turkey, breaking it apart as it cooks. Add the diced onion and minced garlic, cooking until the onion is translucent. Season with salt, pepper, Italian seasoning, and red pepper flakes (if using).
Stir in the marinara sauce and let it simmer for about 5 minutes to combine the flavors.
In a separate bowl, mix the ricotta cheese with half of the mozzarella and Parmesan cheese.
In the slow cooker, layer the ingredients: start with a spoonful of the meat sauce on the bottom, then add a layer of ziti, followed by dollops of the ricotta mixture. Repeat the layers until all ingredients are used, finishing with the remaining meat sauce on top.
Sprinkle the remaining mozzarella and Parmesan cheese on top of the final layer.
Cover the slow cooker and cook on low for 4-6 hours or on high for 2-3 hours until the cheese is melted and bubbly.