In a heavy skillet over medium heat, dry roast the shallots, turning occasionally until softened and blackened. Remove from heat, peel, cut in half lengthwise and set aside.
In a large pot over medium-high heat, bring squash, coconut milk, broth, shallots and cilantro leaves to a boil. Reduce heat and simmer until squash is tender, about 10 minutes. Stir in the fish sauce, salt and chicken, if using. Cook for another 3 to 4 minutes. Taste for salt and adjust if necessary.
To serve, ladle into bowls, top with green onions and toasted pepitas.