What version of ArcGIS Server are you currently on? I have done something similar upgrading from Server 10.1 to 10.3.1 and I didn't have a problem. You should generally be OK but it would be a good idea to do the upgrade on a test environment first. This is what I did.
The flex viewer consumes the ArcGIS Server REST API. This is what will get upgraded when you do upgrade ArcGIS Server. Your flex viewer apps won't change and once the new Server REST API doesn't have any breaking changes to it the flex apps can continue to consume the api without problem. Here is the change log for the various versions of the REST API. Generally new features are added but old ones are not removed to preserve compatibility.
But I can't stress enough to do this in a test environment first.