Preheat the oven to 375°F.
Cut the summer squash in half lengthwise and scoop out the seeds to create a hollow center. Place the squash halves cut-side up in a baking dish.
In a large skillet, heat the olive oil over medium heat. Add the diced onion and sauté for about 3 minutes until translucent.
Add the minced garlic and sauté for an additional 1 minute until fragrant.
Add the Italian sausage to the skillet, breaking it apart with a spoon. Cook until browned and cooked through, about 5-7 minutes. Drain any excess fat if necessary.
Stir in the cooked rice, marinara sauce, Italian seasoning, salt, and black pepper. Mix well and let it simmer for 2-3 minutes.
Spoon the sausage mixture evenly into the hollowed-out summer squash halves. Top each filled squash with shredded mozzarella and grated Parmesan cheese.
Cover the baking dish with aluminum foil and bake in the preheated oven for 25 minutes.
Remove the foil and bake for an additional 10-15 minutes until the cheese is bubbly and golden.
Let the stuffed squash cool for a few minutes before serving. Garnish with fresh basil leaves if desired.