Hello Abdul,
You cannot do a direct migration to Office 365 groups but you will be able to export the contents and place these in shared mailboxes or Office 365 groups afterwards.
The configuration you've mentioned only designates the users to the right path to where the public folders are, where "remote" means on the local Exchange Server.
I hope this will answer your question.