What Type of Ducting Should Be Used for a Bathroom Exhaust Fan?
I used insulated flex ducting like below for my bath vents.
Try to keep it flat or sloping toward the outside to avoid condensation pockets.

https://www.homedepot.com/p/Master-Flow-4-in-x-12-ft-Insulated-Flexible-Duct-R6-Silver-Jacket-F6IFD4X144/203420974



Edit 1: 
I'm not familiar with a code that requires rigid ducting for bathroom fans. (Mass local here)
Unlike dryer ductwork, it's not going to be subjected to high heat or a potential for significant lint accumulation.   That said, there is nothing stopping you from using regular rigid metal ducting.  (rigid plastic ducting eg: pipe, might even be acceptable) 

There is also available pipewrap insulation,  I'm looking to use some on my dryer ductwork, if I ever get the energy to go back into my attic.

https://www.homedepot.com/p/8-in-Dia-R-6-Ductwork-Insulation-Sleeve-INSLV8/100396954?MERCH=REC-_-PIPHorizontal3_rr--302000644--100396954-_-N