Method for producing polymer compound, polymer compound, and photoresist resin composition