Jeff Bezos and Bill Gates are the richest people in the world, worth $119 billion and $107 billion respectively, according to Bloomberg.

Amazon is headquartered in Seattle and Microsoft is just outside the city, and both billionaires have homes in the nearby small town of Medina, Washington.

With a population of just over 3,000, Medina is the seventh richest zip code in the U.S. with a median home value of $2.77 million, and the town has a median household income of $186,464 in 2017, the most recent data available. (By comparison, the 2017 median household income in the U.S. was $60,336.)

Yet Medina is running out of money — and the irony is lost on no one.

So how is the home of the richest people on the planet coming up short?

The problem is, even though Medina home values are increasing, the city's income is not rising at the same speed, the city says.

"You may find it hard to imagine that the City doesn't have enough income to sustain current service levels, particularly in this economy. While property values continue to rise, the City's tax revenues don't rise in tandem," reads a June 2019 Medina city newsletter.

That's because by law, the local government cannot increase the amount of tax revenue it collects by more than 1% each year without the residents voting to approve a larger amount.

The property tax rate in Washington state is set as a rate, not a percentage, Medina's director of finance Julie Ketter tells CNBC Make It. For Medina, the property tax rate is $7.92925 per $1,000 of assessed value.

Of that, only $0.63486 goes to the city of Medina, Ketter says. (Another $2.42782 goes to local schools, $0.12266 goes to the port, $1.21906 goes to the county, $0.37441 goes to the library, $0.21762 goes to emergency medical services, $0.09660 goes to a flood fund, $0.20700 goes to regional transit and $2.62992 goes to the state school fund.)

TWEET: Need more proof that Washington's tax system is as messed up as it gets?

The most expensive home in Medina is assessed by the King County Assessors office as being worth $131,239,000, Ketter tells CNBC Make It. This home — presumably Gates "Xanadu 2.0," which has 24 bathrooms and a trampoline room — has a $1,040,627 total property tax in 2019. Of that, $83,318 will go to the City of Medina.

But comparatively, the majority of the homes in Medina are not as expensive: The median value of a home in Medina is just over $2 million, Ketter says.