The Preserving Rural Housing Investments Act clarifies tax rules for tax-exempt organizations that own stock in government-sponsored mortgage enterprises, specifically Fannie Mae and Freddie Mac. The bill amends the Internal Revenue Code to specify that the federal government itself should not be considered a "tax-exempt entity" when applying certain tax rules related to these mortgage companies' stock ownership. This change affects tax-exempt organizations like nonprofits and charitable groups that invest in housing-related securities issued by these government-sponsored enterprises. The legislation is effective retroactively, applying to tax years ending after July 30, 2008, meaning it clarifies rules that have been in effect for over a decade. The bill aims to preserve and protect rural housing investments by ensuring that tax-exempt organizations can continue their participation in mortgage financing without running into restrictive tax classification issues.