From the Latin pastinaca "parsnip", which contains the -ac- suffix used to form some plant names; and this is why the derived adjective is pastinaceous rather than **pastinacaceous. Only attested in English in a 1657 translation of a Latin medicinal text.
The Latin was borrowed widely into European languages in various forms, including Polish pasternak: I can't explain where the intrusive /r/ comes from here. The author Boris's grandfather Osip is said to be the first who bore this surname (when surnames were imposed on Jews in Russia).
The English -r- in the spelling is apparently an accretion on older forms such as pasnep, in awareness that many words formerly pronounced with /rs/ had dialectally lost the /r/ (e.g. 'hoss', 'passel', 'cuss', 'ass' "bottom"). The ending is an assimilation to 'neep' (also as in 'turnip').