You could have:
No attributes obsolete (vanilla game)
Negative attributes obsolete (artillery -> rocket artillery no longer requires setup, etc)
Negative attributes and positive, non-UU attributes obsolete (pikemen -> riflemen loses its mounted bonus, since they no longer use the Pike weapon)
Negative, positive, and UU attributes obsolete.
I would say:
a) Penalties should always be removed when upgraded (and then apply whatever upgrades apply to the new chassis). eg artillery setup requirement
b) Normal promotions that are available on both the old unit and the new unit are retained (eg: swordsman drill promotion retained when upgraded to longswordsman).
c) Normal promotions that are not available to the new unit are lost: eg crossbow upgrades to rifleman, it loses its ranged bombardment promotions. Lancer upgraded to AT gun loses its bonus vs cavalry, Pikeman upgraded to rifle loses huge bonus vs mounted, etc.
d) UU-specific bonus promotions are always retained.
Yes, this means that a Rifleman that Spain builds will be different to one upgraded from Tercios, but I think this is ok.
Call it a special advantage for Spain that at one period it had a special anti-cavalry doctrine.
The alternative is losing these, which is very bad for balance; some UUs would be very weak for their faction if the bonuses were not retained.
I don't think that ranged bombardment promotions should be able to convert into something new.
It is far easier to obtain and retain highly experienced bombardment units than for melee units, because they fight every round and can do so without ever being put at risk.
If you did have some kind of conversion system, then I would convert them to a much weaker modern version; eg bombardment promotions that give +20% convert into melee promotions that give +5% or something.
They should definitely not convert a 20% ranged promotion into a 20% melee promotion.