Preheat oven to 325 degrees F (165 degrees C). Spray a baking sheet with a thin layer of cooking spray. Place squash halves cut side down on the baking sheet.
Bake squash 35 minutes in the preheated oven, or until a knife can be easily inserted. Remove from oven, and cool.
Meanwhile, spray a non-stick saucepan with cooking spray. Over medium heat, saute the onion and garlic until golden brown. Stir in tomatoes, basil, bouillon cube, and black pepper. Cook for about 15 minutes, or until you have a medium thick sauce.
Remove squash strands with a fork, reserving the shells. Layer each half with a spoonful of the sauce, a layer of spaghetti squash strands, olives, and mozzarella cheese. Repeat layers until shells are full, or until all of the ingredients are used. Top with Parmesan cheese.
Bake for 20 minutes in the preheated oven, or until Parmesan cheese melts.