The First Amendment does not explicitly mention campaign spending (or political campaigns at all), and until 2010, the First Amendment was not considered to apply to monetary spending in political campaigns.
The right to petition the government is explicitly protected, but that doesn't apply in the case of IL-9, which was an open race and therefore none of the candidates were actually elected representatives.