Electoral Incentives and the Allocation of Public Funds