How often should I have my house's foundation inspected?

I would say that you only have to have it inspected if you notice floor or wall cracks that were not there before. That would indicate that something is causing a movement and you would need to know what is causing it, and what to do about it.
Also, if you see an unusual erosion happening anywhere around the house exterior perimeter, have someone look at it.

Because you are in Chicago with frequent freeze thaw, at the minimum every two years.