How can I wire this bathroom fan into the middle of an existing circuit?
how would I connect everything up at the light to allow the attic outlets to still have continuous power? 


Wire neutrals #1, #2, and #5 together; there will be no neutral connection to Romex #2. Connect "black" #1, #2, &amp; #3 together, to deliver power to the outlet in the attic and to the wall switch; #3 will connect to the "line" terminal on the switch (if it has a terminal labeled as such, most do not and it doesn't really matter).

The wire you have labeled as "neutral #3" in your diagram will actually become the "switched hot" that delivers switched power back up to the load (to black #5 and red #2), if it is a white wire then you must mark it as a switched hot by wrapping black or red tape around the visible insulated ends in each junction box, or marking those ends with a black or red marker, or labeling them somehow.