According to the situation you described, you can apply for commercial loans, but according to the current loan policy in Shanghai, you can't use provident fund loans if you have two loan records, so you can only apply for commercial loans for replacement. 50% down payment for ordinary houses and 70% down payment for non-ordinary houses.
I hope my answer can help you.