Missile ranges are always a guesstimate and dependant on many variable factors. Trajectory, direction or travel (generally west bound sorties will have lesser range since they are moving against the rotation, the latitude of launch, (nearer the equator will have greater range), type of propellant, nozzle and a whole host of other factors.
Its literally rocket science after all.
The "official ranges" are always written down with certain parameters in mind. Payload can make a big difference. A slight reduction in weight can result in huge gains in range and vice versa...... this is why minatureisation is such an issue to this day.
The Trident II used by the US and the UK for instance has a range of about 7000 km for a full load, and 11,000 KM for reduced payload (and probably higher for even more for reduced payload). Thats more than a 50% difference. The SS18 has a range of between 10,000 km and 16,000 KM in its various incarnations.
Other things that can effect range include type of warhead (for ones which are designed to kill hard target, like the Shaheen series is, you need more robust and therefore heavier RV's). The addition of penetration aids can greatly increase the probability of defeating enemy defences, but they impose a range penalty; the British modification of their Polaris system with such aids reduced range of said system by about 40%.
Accuracy is another one. Longer the range, the less the accuracy is. At longer ranges you might be able to destroy soft targets like cities but not have high confidence in destroying hard targets, like command bunkers, weapons depots
Finally a system can be tinkered with over time. Using a different propellent fuel might increase range, but might not be practical due to a costs/and or logistics perspective. In the same way the use of better nozzles can greatly enhance performance.
Indeed sometimes the difference between the same weapon systems are so great that they are almost new systems..... which seems to have been the case with the Shaheen II, in its various incarnations. Part of what seems to have been done is the military accepted that the system was a distinct missile and renamed the long range version as Shaheen III.
The website Astronatrix gives the range of Shaheen II as upto 3500 km (
http://www.astronautix.com/lvs/shaheen2.htm) Again, that is based upon various presumptions (reduced payload due to more compact warhead for instance). The actual range of it carrying a useful load is undoubtedly classified and will be far in excess of what is published (and don't worry enemies know that)
So in short the answer is that ranges that are given out for weapons are based upon certain parameters and presumptions about employment of said systems during conflict. Not the maximum possible ranges.