You could use applicability checks to look for the reg key that specifies the old server. If that reg key points to the old server, the software uninstall then install runs, otherwise its not applicable and does not run. Does that make sense? You could also create a filter that includes only the machines that have the old server name, then once the server name is changed and the new install is completed, it will no longer be targeted and the policy will disappear from the machine.
Is that what you were looking for?