Shared OneDrive folders in Office 365 are backed up from the folder owner.
If a folder is shared with another user and this user creates a sub-folder there, then that sub-folder is shared by default with the root folder owner and the user can't remove it. In terms of backup this means that the sub-folder will be backed up in the backup of the root folder owner by default.
If the user also has Shield Backup Office 365 in use, the folders shared with him/her are not backed up unless moved from the "Shared with me" section to their own Drive. Once moved, all of them will be backed up also from this user.