The wiring as shown in the updated diagram is fine.
The red from the timer is the live load for the exhaust fan, i.e. the fan's black. The black of the timer is its power supply, so it needs permanent line feed. You can wire it to the GFCI's line side without protection, or to the GFCI's load side and have protection at the fan.
Since the red in the junction box goes to the fan, the fan will be on the timer.
The remaining black, green and white can be wired as shown:
- Line-side neutral and fan neutral and feed neutral whites are tied together,
- all greens are tied together, and
- the downstream black and white are wired to the load side of the GFCI
Generally there is no need for this in a bathroom, but if you want the protected option for the fan, then you would need access to the neutral going to the fan. It should not be wired to the line side neutrals, but instead be wired to the load side of the GFCI. Your updated drawing shows that the required neutral for the fan, and if it's in the junction box then this option is available to you.
It is generally advisable not to have lighting on the protected side, so that tripping the GFCI does not put bathroom visitors in the dark.
To test and verify correct load/line wiring of the GFCI you can apply its test button and confirm that the fan still works and that the downstream outlets have been de-energized.