In the case of 4-hydroxyphenylacetic acid, the Vilsmeier-Haack reagent (formed by the reaction of SOCl2 and DMF) would indeed convert the carboxylic acid group into an acid chloride. This acid chloride could potentially react with the remaining alcohol groups on other molecules of 4-hydroxyphenylacetic acid, leading to the formation of ester linkages and potentially polymerization.
Regarding the addition of triethylamine and DMA.HCl to finalize the amidation reaction, it's important to note that DMA.HCl (dimethylformamide hydrochloride) is typically used as a reagent to generate the amine species required for the amidation reaction. It is possible that DMA.HCl is not playing a significant role in the exothermic reaction you expected. Other factors, such as reaction conditions and concentrations, might also influence the outcome.