First attested in 1706, from the noun rake, "a debauched person, a scoundrel", and the adjectivizing suffix -ish, which is native to English from Proto-Germanic *-iska of the same usage, ultimately from Proto-Indo-European *-iskos, also an adjectivizing suffix.
The noun rake specifically in reference to a person (and not the gardening tool) is first attested in the 1650s as a shortening of the noun rakehell, of the same meaning. Originally an adjective first attested in the 1540s, and used as a noun by the 1550s, rakehell is a word of uncertain origin, specifically of two possible origins.
The first possibility is that the word is an alteration of the Middle English adjective rakel, meaning "rash, hasty, headstrong", by influence of the phrase rake Hell (attested by the 1540s). The word rakel is most likely from the Middle English verb raken, "to proceed," which is from Old English racian (see Note 1 below), "to hasten, to go forward", which is of unknown origin.
The second possibility is that the word is actually just a conjoining of the phrase rake Hell, which means "to go over Hell thoroughly, to search through Hell (for something or someone)". In this case, a rakehell would be "a person who can be found by raking through Hell for them", or more succinctly, "an evil person, a villain".
Etymologically, the verb rake is from Old English raca, "to scrape things up into a pile", which is from Proto-Germanic *rak-, "to gather; to heap up", which in turn is from the Proto-Indo-European root *reg- (see Note 2 below), "to move in a straight line". The word Hell is also native to English and Germanic in origin, from Proto-Germanic *haljÅ, "the underworld", literally "concealed place", from the Proto-Indo-European root *kel-, "to cover up, to conceal".
1) Old English racian may or may not be the source of the Modern English verb race, "to move swiftly, to hasten". Most etymologies give the source for race as a Scandinavian borrowing from a word or words relating to a rush of water. This may also be the as-yet unknown source of Old English racian, but no solid connection has been made to date.
2) PIE *reg- is also the ultimate source of a plethora of other Modern English words, including regular, rule, regent, right, erect, and many more.
https://www.etymonline.com/word/rakish
https://www.etymonline.com/word/rake
https://www.etymonline.com/word/rakehell
https://www.etymonline.com/word/hell
https://www.etymonline.com/word/-ish
https://www.oed.com/dictionary/race_n1