Preheat oven to 400 degrees F (204 C) and line a large baking sheet with foil and spray with non-stick cooking spray.
Cut spaghetti squash in half lengthwise and scoop out seeds with a spoon.
Sprinkle the interior of the squash with salt and pepper and place cut side down on baking sheet.
Roast for 45 minutes. When done, decrease oven temperature to 375 degrees.
In the meantime, add the salt, pepper, tofu, lemon juice, nutritional yeast, basil, oregano, and vegan parmesan cheese to a food processor and process until the mix is semi-pureed.
Once the spaghetti squash is baked, use a fork to scoop out spaghetti squash into fine strings.
Lightly spray a 9x13-inch baking dish and lay down 1/3 of the squash then top with several spoonfuls of tofu ricotta, then pour on a layer of marinara sauce. Repeat until both the spaghetti squash and tofu ricotta are used up (about 3 layers).
Loosely cover the dish with foil and bake for 20 minutes at 375 degrees F (190 C). Then remove foil and bake for an additional 10-15 minutes, or until the sauce is bubbly and the top is golden brown.
If desired, add red pepper flakes to top it off.