Bring a large pot of salted water to a boil. Add the spaghetti and cook according to package instructions until al dente (usually about 8-9 minutes). Drain the pasta well and toss with a little olive oil to prevent sticking. Set aside.
In a large skillet, heat 2 tablespoons of olive oil over medium-high heat. Add the ground beef, breaking it apart with a spatula. Season with garlic powder, onion powder, salt, and pepper. Cook until the meat is browned and cooked through, about 6-8 minutes. Drain any excess fat.
Pour the marinara sauce into the skillet with the cooked beef. Stir to combine and let it simmer for 3-5 minutes to blend the flavors. Remove from heat.
In a large mixing bowl, combine the cooked spaghetti with the meat sauce. Mix until the pasta is evenly coated.
Preheat your oven to 375°F (190°C). In your 9x13-inch baking dish, spread half of the spaghetti mixture evenly. Dollop half of the ricotta cheese over the pasta in spoonfuls, then sprinkle with half of the mozzarella, Parmesan, and cheddar cheeses. Repeat with the remaining spaghetti, ricotta, and cheeses to create two cheesy layers.
Cover the baking dish with foil and bake for 20 minutes. Remove the foil and bake for an additional 10-15 minutes, or until the cheese is melted, bubbly, and starting to brown on top.
Let the baked spaghetti cool for a few minutes before serving. Garnish with fresh basil leaves if desired for a pop of color and fresh flavor. Serve warm and enjoy the melty, cheesy goodness!