What causes quadratic hash problem?
Double-SHA-hash duration is dependent linearly on the size of the template?


Yes, of course. 

So, increasing the count of inputs twice we also increase the size of each template ~twice and the work for signing/verifying whole transaction increased quadratic