Being at Hogwarts does not automatically mean a family is posh/rich as the Ministry of Magic covers the tuition fees and therefore attendance costs the students and their families nothing.
I will classify each known Prefects into "Posh" meaning monetarily privileged, i.e. rich, or "Not Posh", i.e. poor or at least not of wealth, based on evidence from the text describing their wealth or upbringing. I will also mention blood-status but only use that if other supporting information is limited as blood-status does not mean wealth but can be seen as a social status point.
The following students are known Prefects:
Gryffindor: 1 out of 7 Posh
- Lily Evans - A Muggle-born from a "a rundown industrial area of the English Midlands" - Not Posh
- Percy Weasley* - Not Posh
- Bill Weasley* - Not Posh
- Ron Weasley* - Not Posh
- Charlie Weasley* - Not Posh
- Hermione Granger - A Muggle-born with two dentists as parents, was able to relocate her parents to Australia during the Second Wizarding War seemingly with ease - Posh
- Remus Lupin - A half-blood whose in early childhood was bitten by a werewolf causing his parents to have to constantly move - Not Posh
- *One of the Weasley's main characteristics that they have little money, I don't feel this needs further explanation.
Slytherin: 3 out of 4 Posh
- Draco Malfoy - Pure-blood, the Malfoy family is known for being wealthy for "ten consecutive centuries". - Posh
- Pansy Parkinson - Pure-blood, not much known other than her status a bully, family is one of the "Sacred Twenty-Eight", ancestor was a Minister of Magic - Posh
- Lucius Malfoy - Pure-blood, same reasons as Draco - Posh
- Tom Riddle - Half-blood, grew up an orphan with nothing, mother lived a run-down shack, father was wealthy but was under the effect of love potion - Not Posh
Hufflepuff: 2 out of 4 Posh
- Hannah Abbott - Half-blood, the Abbotts are one of the Sacred Twenty-Eight, nothing else known about the family, ends up marrying Neville and owning the Leaky Cauldron, can probably be seen as middle class - Not Posh
- Ernie MacMillan - Pure-blood, the MacMillans are one the Sacred Twenty-Eight, known to be quite pompous, ancestor Melania married into the Black family (who would not likely let in any riff-raff) and is the grandmother of Sirius - Posh
- Teddy Lupin - Half-blood, son of Remus Nymphadora, raised by his grandmother Andromeda Tonks nee Black, Tonks family not known for anything with Ted being described as a "right old slob" when compared to the Dursleys - Not Posh
- Cedric Diggory - Pure-blood, father works for the Ministry, ancestor Eldritch was a Minister for Magic - Posh
Ravenclaw: 0 out of 2 Posh
- Padma Patil - blood status unknown, described often as good looking, - Not Posh
- Anthony Goldstein - half-blood, nothing known outside what JKR has posted on Twitter which is that he is Jewish and a descendant of Queenie Goldstein. - Not Posh
In conclusion there does not seem to be any class favoritism in selecting Prefects, except for possibly Slytherin.