At the start of Ch.39 we get the following line about Mr Palmer:-
Charlotte's invitation to Cleveland "... was inforced with so much real politeness by Mr. Palmer himself, .... joined to the very great amendment of his manners towards them since [Marianne] had been known to be unhappy..."
So, Mr Palmer is not such an inconsiderate oaf as he first appeared. Several possibilities occur to me:-
Maybe he was simply having an especially bad-hair day when we met him at Barton.
Or perhaps has he come to appreciate Elinor's good sense, and is genuinely moved by Marianne's deep unhappiness.
Alternatively, perhaps JA needed to mellow him a bit in order to get Elinor and Marianne to Cleveland, but was so pleased by her first portrayal of him that she didn't want to alter it.
Any thoughts?