Is it possible to shorten the flue/chimney of a range hood?
Depends on the hood. Some come with a telescopic shroud, to go bigger, but not smaller. Check the dimensions on the box. Whatever the small dimension is, has to be able to fit.

Or open the box to see how much of the shroud you could cut off, having grabbed an elbow from another isle in the store to see the ultimate clearance requirements when assembled. Flexible might save you an extra inch or so, but is ideally avoided.