While there is a strong policy against operating a motor vehicle without proper license, Ontario Auto Insurance regime still allows such drivers to access coverage for medical rehabilitation and attendant care. You will not however have access to income replacement benefits or non earner benefits, housekeeping and / or caregiving expenses (even if you have purchased additional coverage), lost educational expenses and even visitor expenses. In this case you will not be able to sue the at fault driver in tort.
Same holds true if you were convicted of an offence under the Criminal Code, RSC 1985, c C-46. However even before conviction is entered insurer will not be paying out the excluded benefits. Instead, insurer will be holding the amounts you are otherwise entitled in a so called trust until your charges are dealt with. In case where there was no conviction entered insurer will pay out the amounts held in trust shortly after the charges were disposed of.