Probing quarkonium production mechanisms with jet substructure