Put the chicken, ginger and salt in a medium pot and cover with cold water by 2 cm (1 inch). Bring to a gentle simmer over medium heat, then cover, turn the heat to low and cook for 12 minutes. Turn off the heat and leave covered for 10 more minutes while you prep. The thickest part should read 74 C (165 F).
Whisk the lime juice, fish sauce, sugar, garlic and chili in a small bowl until the sugar dissolves. Taste it. It should be sharp, salty and sweet in roughly equal measure.
Toss the green cabbage, red cabbage and carrot together in a large bowl. Drain the red onion and add it.
Lift the chicken out of the pot, rest it for 5 minutes, then shred it with two forks into thin strips, working along the grain.
Pour two thirds of the dressing over the vegetables and toss with your hands for a minute, squeezing lightly so the cabbage softens. Add the chicken, herbs and remaining dressing and toss again.
Divide between two plates and top with the crushed peanuts and fried shallots. Serve right away.