Compared to their private sector counterparts? You bet they are the absolute bottom of the barrel of their chosen profession. And the reason their private sector counterparts are better is because a large multinational corporation is pretty much going through life with the infinite money cheat code on and can afford to snatch up the best talent, while governments with their limited budgets are forced to settle for the bargain bin employees.
First, some of the jobs I mentioned don't even really have a private-sector counterpart. I don't think there's any private-sector firefighters out there.
Second, with stuff like maintenance and janitorial staff or any other low-level, "low skill" job, I guarantee you they're getting paid <excrement> regardless of whether they're working for the private or public sector, and for that matter, in both cases, there's a decent chance they're actually working for a sub-contractor who just pays them terribly with no benefits and crap scheduling
Third, comparing a large multinational corporation to a local government is like comparing the New York Yankees to some random minor league team in a town with around 2000 people- not really remotely the same scale of operation there, and if it's a national government position, they probably actually can pay pretty competitively because they almost literally do have the infinite money cheat code on
Fourth, a lot of the public-sector jobs tend to have lower pay but better benefits and job security, so even some of the more talented workers just end up gravitating towards that because they don't want to end up switching private companies they work for every 3 years because that's the only way they can get raises and promotions, or because random layoffs happen sometimes, or the tech startup you worked for is going under, or maybe they just like the work environment better or think that their job is more meaningful and helpful to the public at large than a comparable private sector job would be, and they wanna feel like they're doing some sort of good with their job
Fifth, if it's a job like a researcher at a public university or a national lab, they're pretty much all highly talented people, they're getting paid pretty well, definitely comparable to what they could get at any sort of comparable private-sector job
Sixth, "better" in what sense? Private sector corporations can do some things better, but the public sector provides lots of services that no private corporation ever would because there's no way to make a profit off it- USPS will deliver anything anywhere fairly cheaply, UPS or FedEx would absolutely not send your mail to BFE middle-of-nowhere, Alaska, for anywhere near as low of a price as USPS would. More generally, public services have to serve everyone everywhere in the country and do so equitably, private services are under no such obligation, and a public service doesn't have to run profits for owners or shareholders, because they're investments in the community, not ways of making rich dudes some more money
Seventh, like I said, large multinational corporations also have layers upon layers of middle managers and other assorted administrative positions that really don't do anything useful and aren't usually exactly the most talented of workers themselves, as dictated by the Dilbert principle