Preheat oven to 400°F (200°C).
Cut spaghetti squash in half, remove seeds, and drizzle with olive oil, salt, and pepper.
Place squash halves cut-side down on a baking sheet and roast for 40-45 minutes.
Brown ground beef in a skillet, seasoning with garlic powder, basil, salt, and pepper.
Add marinara sauce to the beef, simmer for 10-15 minutes.
In a bowl, mix ricotta cheese, egg, and Parmesan.
Once squash is roasted, scrape out the strands and place them in a greased baking dish.
Layer beef sauce, ricotta mixture, and mozzarella cheese on top of squash.
Repeat layers, ending with mozzarella cheese on top.
Bake at 375°F (190°C) for 20-25 minutes, or until cheese is bubbly.
Allow to cool, slice, and serve.