i was in exactly the same situation before as i sayed in hk and had a residence (i.e. rented an apartment under my name, had a mobile phone contract, etc.) for 2 years on a visitor visa (90 days rolling).
when i got a job, our visa processing lawyers/friends at deloitte thought i am illegal in hong kong. (side story, they didn't even check my immigration; they just stopped processing my employment visa and risked my potential job, grrrrr).
i went to immigration. they clearly stated in writing that i was never illegal in hong kong at any time and could process the employment visa application as normal.
conclusion: you are clearly not illegal in hong kong. however immigration has the discretion to refuse you a repetitive entry into hong kong on a visitor visa and they have kindly alerted you that they might do this next time around. no problems existing right now whatsoever