The flight physical to get into flight school lasts for two years. When you get down to API, you will have another flight physical and get your up-chit. After that, you need a flight physical every year on your birthmonth.
Just a point of clarification,
OPNAV does not stipulate a difference between the initial flight physical and the annual. Therefore the flight physical you recieve when you sign your contract will expire prior to getting to Pensacola. Fortunately it isn't a big deal since you are not in a flight status at until you get there and EVERYONE gets a full physical when they check in prior to API.
Now you may wonder how they fly you during IFS. Well the answer is simple, the Navy's Flight Physical does not count in regards to flying civilian aircraft and a seperate FAA physical is required, expires every 3 years. If you have questions reference OPNAV 3710.7T page 8-24 concerning Flight Physicals.
ALL Navy Flight Physicals are good from the date of exam to the end of the NEXT birthday month unless it is after the first day of the preceeding month in which case it is valid to the following birth month.