Several points:
As I argued in this answer, the Sorting Hat may not have adhered to the founders' method of selection with perfect imitation. It is possible that while Hufflepuff herself would take anyone, the Sorting Hat would not quite sort that way, especially given that the Sorting Hat has control over the other three houses as well, whereas Hufflepuff herself did not. In other words, Hufflepuff herself didn't specifically value students with no qualities. She did value certain qualities but simply was willing to teach anyone because none of the other founders would take those students. But once the Sorting Hat is in complete control, it can distribute the students with no qualities across the various houses.
We know that there are specific qualities that are valued by Hufflepuff House. In the Sorting Hat's song in Philosopher's Stone we are told:
You might belong in Hufflepuff,
Where they are just and loyal,
Those patient Hufflepuffs are true
And unafraid of toil;
In the Sorting Hat's song in Goblet of Fire we are told:
For Hufflepuff, hard workers were
Most worthy of admission;
So if a student is not just, loyal, patient, true, unafraid of toil, or hard-working, the Sorting Hat might not sort them into Hufflepuff even if the student is also not brave, smart, or pure.
As Dumbledore noted at the end of Goblet of Fire, Cedric Diggory exemplified the qualities of Hufflepuff House:
"Cedric was a person who exemplified many of the qualities that
distinguish Hufflepuff house," Dumbledore continued. "He was a good
and loyal friend, a hard worker, he valued fair play.
If Hufflepuff was just the house for rejects, those qualities wouldn't be distinguished.
Additionally, we know that the Sorting Hat takes the student's opinion into account. As Harry tells his son:
But if it matters to you, you'll be able to choose Gryffindor over
Slytherin. The Sorting Hat takes your choice into account."
"Really?"
"It did for me," said Harry.
We also know that some people did not want to be in Hufflepuff precisely because of its reputation. The first time Harry meets Malfoy, Malfoy says:
imagine being in Hufflepuff, I think I'd leave wouldn't you?"
And Harry and Hagrid later have the following conversation:
"And what are Hufflepuff and Slytherin?"
"School Houses. There's four. Everyone says Hufflepuff are a lot o'
duffers, but —"
"I bet I'm in Hufflepuff," Harry said gloomily.
Hermione also implies that she wouldn't want to be in Hufflepuff:
I've been asking around, and I hope I'm in Gryffindor, it sounds by
far the best; I hear Dumbledore himself was in it, but I suppose
Ravenclaw wouldn't be too bad....
Therefore, it is entirely reasonable that students would specifically ask not to be sorted into Hufflepuff (whether explicitly, or by simply thinking that they don't want to be).
Thus, even if you would expect more than 25% of the student population to not be brave, smart, or pure, it is still possible to explain why Hufflepuff House does not contain more than 25% of the school.