A firearm would be my choice. Being out there for 7 days and nights, the flashlight would only have power for maybe 30 hours, after that it would be useless. Being in a strange area, you would be more concerned with people/ animals doing you harm as you look for shelter and food/water. 7 days with little or no food/water would be a tough grind for a city dweller. 8 hrs of moving, cold and wet would already sap you of any energy you have. Upon finding some shelter, a firearm would allow you to rest with some sort of security, allowing you to wake up and do it again.
I would take the flashlight since the firearm may make some people afraid to help you- especially on the left coast. Also, in a powerless area a light at night would be critical to allow for safer movement to a secure area and the striking feature of a flashlight is still considerable. One might be able to scrounge a thick branch (a club) in the dark using the flashlight- if more security was felt to be needed.
Based off the given parameters of the scenario, knowing this is going to be 7 days and 7 nights, I feel the flashlight is a no-brainer. Now on the other hand if I didn't know how long I was going to be stranded and knew that I had to travel, I think I would opt for the 9mm... But based on the scenario, a flashlight is better suited for the given situation. I can always find a weapon but light in the rainy darkness is not so easily found.