Preheat oven to 400 degrees. Slice the squash in half and scoop out the seeds and pulp with a spoon. Save for another use or discard. Spread about 1 tablespoon vegetable oil on the bottom of a roasting tray and place the squash halves cut side-down on the tray. Roast for about 30 minutes, or until the flesh feels soft when poked and it has shrunken away from the skins a bit. Flip over and let cool. Once cool enough to handle, scoop out all the flesh and reserve in a bowl.
Meanwhile, heat a heavy-bottomed pot with another tablespoon or so of vegetable oil and sweat the onions over medium-low heat. Season with salt and pepper and cook until translucent, about 8 minutes, stirring occasionally. Add the curry powder, optional cayenne, chopped tomato and garlic and cook, stirring occasionally, another 4-5 minutes. Add the roasted squash, coconut milk and vegetable stock. Stir to combine thoroughly and bring just to a boil. Reduce heat to a simmer and cook, covered, for about 20 minutes or so. Using a hand blender, puree the soup to a smooth consistency (this can also be done by transferring the soup in batches to a food processor or blender). Taste for seasoning. Add additional stock or coconut milk if it's too thick to your liking. Once the soup is to preferred taste and consistency, stir in the lemon juice to taste and serve.