Charge reactions occur before chargers are moved, and if some of the chargers are in the front, but the majority are in the flank, you could fire at the chargers. See p.20, diagram 20.2- the rightmost unit of spearmen has 4 models in the front and 6 models in the flank, they will hit flank. However, the goblins could shoot at them, and you would have to check each goblin individually to see if he has LOS. I would guess that 2, maybe 3 goblins could shoot.
The situation you describe sounds more like the left side of diagram 20.2, where the charge started outside your unit's LOS. In that case you would not get to stand & shoot at all, because you have no target.
Skirmishers, of course, have totally different rules.
And formed chargers always align on (square up to) the formed chargees. So you would get something resembling #1, above. See p.22, diagram 22.1, 'aligning the chargers'.
GGGG (front)
GGGGDDDDD where all four goblins get to attack, but only two dwarfs can hit back- assuming they survive.
GGGGDDDDD
GGGG (rear)
Again, skirmishers have totally different rules.