The two departments approach valuation quite differently.
Transfer tax is normally assessed on the higher of the declared escritura price or the deemed book value (multiiple of catastral value). If the deemed book value is excessive you could consider asking the Junta valuations department to re-value before completion.
The CGT office look at transactions they consider unusual and that would normally be permuta (swap) rather than subrogation (mortgage). They would only re-value if it really looked odd. They are less likely to work by reference to multiple of catastral value and more so by reference to other properties and price per sq me etc plus plot etc - a different valuations approach.
I have only ever had one CGT challenge and that was becuase it was a complex transaction and also involved permuta. I had to draw a schematic for them to even understand the transaction. The schamatic explained how the property was acquired and how it was disposed. It involved multiple modelo 211s and so on .....
It is possible to appeal and the appeal fees are very low by comparison to court litigation but you would need to find a lawyer specialising in these type pf appeals.
There will be a 3% CGT retention and you will need to submit a CGT return.
If you have a EUR100k property and a EUR100k mortgage then the escritura price for the property in terms of transfer tax payable and CGT calculations is EUR100k.
A lot of times the tax office don't re-assess CGT is that becuase no matter how you jig the figures with indexation relief high acquisition and disposal costs it's still a loss - so just do your sums and check your valuations and then you will have some idea where you stand.
Don't forget you will also have to pay plusvalia and the bank will want a % for the subrogation.
PM me and I will do any calculations you want.