Line a sheet pan with parchment paper and preheat oven to 425 degrees.
Prepare the spaghetti squash if you haven't already. Cut the spaghetti squash in half, vertically, and scoop out the innards and seeds. Arrange flesh-side up on the sheet pan and drizzle with olive oil then sprinkle with salt and pepper. Turn squash facedown and roast until skin is very tender and cooked, 35-40 minutes.
While spaghetti squash is roasting, prepare the meat sauce. In a large lipped skillet over medium high heat, add olive oil, yellow onions, green pepper and ground beef, breaking up uniformly. Let vegetables and meat brown together until vegetables have started to soften and all beef is browned and broken up.
Stir in spices and marinara. Let simmer over medium low heat until thickened, about 20 minutes.
When spaghetti squash is cooked, carelly shred innards with two forks or tongs and transfer to a large bowl. Season with a generous sprinkling of salt and pepper and stir in the egg, basil, diced mozzarella and meat sauce.
Return entire mixture to your original saute pan, smoothing edges.
Top skillet with remaining sliced fresh mozzarella.
Bake for 15-20 minutes until golden and bubbling. Let sit 10 minutes before serving to cool and thicken.
To serve, finish with grated parmesan and basil leaves. Enjoy!