How can I determine whether or not a phone can be upgraded to Android 7.XX? I’m looking at getting an Android phone, and I don’t want to rule out phones that come with Android 5.XX installed if they can be upgraded to 7.XX, but I don’t want to get a phone if it isn’t capable of being upgraded.
I would suggest a number of things:


Check on the manufacturer's of the phone's website for hints or tips on capabilities that come with the phone, hardware specifications and all features of the phone
Check on technology blogs that do phone reviews e.g "Reviews Tabloid". 
When Android 7.X.X is out check its requirements and compare with the specifications of the phone using Android 5.X.X and see if upgrade is possible. 
Lastly try and find out if the phone allows for OTA updates.