How does the Filament production process work? What are the steps in the production process that factories that produce filament have to take to get from pellets to a full spool of filament.

Which of these steps are critical for quality (thickness, roundness, long shelf life,..) ?
Some general comments about the process used (plastic extrusion):

The plastic extrusion process is not simple- many textbooks dense with equations have been written about it. The lowest cost industrial extrusion processes do not use pellets at all- because pellets have already gone through an extrusion process so they are more expensive than powder resin. There is typically a 'compounding' stage where colors etc. are added before extrusion. 

Significant heat is generated by the screw (which often has a complex geometry) via shear action that is itself temperature and pressure sensitive, and the heat is added to by external heaters in various zones (or subtracted by water cooling and chillers in larger extruders). In some cases we were able to operate an extruder adiabatically- the heat created by the screw motor matched the heat loss as the product left the die and no heating or cooling was needed once the process was stabilized. 

The end result is that you want to plasticize (melt) the plastic and achieve a certain pressure at the die. The plastic is deteriorating the higher the temperature and the longer the time so you want to limit the residence time at high temperature. There is some trial-and-error and a lot of previous experience in the setup person's task. Once the parameters are determined they are recorded and are used the next time that material is run.  

The size of an extrusion is typically determined exactly by downstream equipment rather than controlling the conditions at the die. It is essentially stretched as it comes out of the die and the heat is removed in a cooling trough. 

Here you can see a factory environment with a very typical extrusion setup, used in this case for 3D printing filament (but the setup would look almost the same if they were making slats for Venetian blinds). Notice that there are cooling fans as well as band heaters on the extruder barrel. They control the diameter by adjusting the take-off capstan RPM once the extruder is running well. This extruder looks like it has 4 heat/cool barrel zones and two (heat-only) nozzle zones (6 temperatures total). 

https://www.youtube.com/watch?v=40HOAsUnSQ8

Extruders are categorized by the barrel bore diameter in inches or mm. A very small extruder might be 25mm. An extruder used for pipe production might be 6" (150mm) or more. Some machines use multiple screws.