squash meaning "to press or beat into a pulp". Proto-Indo-European *kweh₁t- "to shake" became Latin quatere "to shake", the frequentative of which was quassāre "to shake violently, break to pieces". Combined with ex-, this became Vulgar Latin (the Oxford Dictionary of English Etymology calls this "Roman") *exquassāre then Old French esquasser "to crush", borrowed into Middle English as squachen.
In Greek, *kweh₁t- became πάσσω (passō) "to sprinkle" and the past participle παστός (pastos) "sprinkled". This was nounified to pástā, plural pastá, pastaí "barley porridge" and was borrowed into Late Latin as pasta "small square piece of a medicinal preparation" (in De medicamentis liber by Marcellus Empiricus, c400). This word became Italian pasta. paste and pâté are from the same Late Latin source thru Old French and French respectively.
squash the vegetable is from Narragansett askútasquash, apparently meaning "a green thing eaten raw", from asq "raw".