Drain tofu by placing slices between sheets of paper towels on a dinner plate. Cover with a second dinner plate and chill in the refrigerator, 4 hours to overnight, changing paper towels as they become soaked.
Preheat oven to 350 degrees F (175 degrees C). Poke holes in the squash flesh with a fork. Add olive oil, garlic, salt, and black pepper to the cavity; place on a baking sheet.
Bake squash in the preheated oven until until easily pierced with a knife, about 40 minutes. Cool until easily handled, about 20 minutes. Use a fork to scrape insides of squash into spaghetti strands.
Spray a large skillet with cooking spray. Cut the tofu slices into cubes and cook over medium heat until crisp on the outside and firm to the touch, about 20 minutes. Stir in mushrooms and artichokes; cook and stir until heated through, about 5 minutes. Add squash strands to the skillet and cook until warmed through, about 5 minutes.
Combine pesto and cream in a small bowl. Pour over tofu and squash mixture in the skillet; mix well. Sprinkle mozzarella cheese on top and serve.