Will those uneducated immigrants earn money when they are no longer needed due to automation? If you have to pay to educate them anyway why not just have your population have kids instead of importing?
The uneducated ones we need to fill the jobs that educated locals won't do and won't be automated in their lifetimes. But a lot of them are educated and we need them too.