"One way" level shifter for PWM 4PIN fan control
You have over designed the circuitry of your PWM driver. This should be all you need:



I have shown changed values for the resistors in the voltage divider get a full 5V swing of the signal and to speed up the rise time of the PWM to the fan.

Member Requested Description of Rise Time PWM Distortion

The following waveform shows a PWM waveform with a lazy rise time in the green color. The horizontal red line shows an example 2.0V threshold voltage of where a fan's internal circuit may detect the level change of the input PWM waveform. The blue colored waveform shows the net high level the fan sees for the PWM input. As can be seen if the rise time of the green waveform were way faster there would be much less distortion of the PWM by the fan. This is further confirmed by the fast falling edges of the waveforms.



** Comparison of PWM Rise Times (20kHz PWM) **
These first two simulation pictures show the waveforms for the original resistor values in your circuit 20K * 10K. The values which give a 4V PWM swing. 



The following pictures show the modified resistor values that provide for a 5V swing and with improved rise time.