Under GDPR, it violates the principle of consent (the described scenario wouldn't meet the other ways that would allow you to use that data) - you're free to provide personalized search by collecting every piece of data about someone, for as long as possible, so that you can do ML on it and personalize their search results, as long as they freely give informed opt-in consent. Bulk collecting the data on everyone doesn't do that.
If you convince someone that they really want to allow you to collect all kinds of data (and they know what you're going to be collecting) because it'll allow them to receive better personalized service and they intentionally choose that this is what they desire, then that's okay. If not, then it's not okay.
If they're choosing not to give you that permission while knowing what it involves - well, that's their choice to make.
If they don't want to think or care about your offer and ignore it and don't opt in, then they obviously don't value the potential benefit enough to pay the price, so you can't collect and use their data. Tough luck.