Toss shrimp with ginger in a bowl and marinate, chilled, 30 minutes (do not marinate any longer or enzymes from ginger will begin to cook shrimp).
Cook shallot, garlic, and anise in butter in a 3-quart heavy saucepan over moderate heat, stirring, until shallot is softened, about 5 minutes.
Add squash, stock, and water and simmer, uncovered, until squash is very tender, about 20 minutes.
Remove star anise.
Purée soup in 2 batches in a blender (use caution when blending hot liquids) until very smooth, about 1 minute per batch, then transfer to cleaned pan and keep warm, covered.
Sprinkle marinated shrimp with salt.
Heat oil in a 12-inch nonstick skillet over moderately high heat until hot but not smoking, then sauté shrimp in 2 batches, stirring, until just cooked through, about 3 minutes per batch, transferring to paper towels.
Bring soup to a simmer and season with salt and pepper. Divide among 8 shallow soup bowls and mound 3 shrimp in each bowl.
• Soup (without shrimp) can be made 3 days ahead and chilled, covered. If making soup ahead, begin marinating shrimp about 40 minutes before serving.