What I have thought might work is that individuals could donate their data to a non-profit entity that would have a legal responsibility to protect contributors' data. The non-profit would act as a data broker for researchers. It could sell aggregate data, but the sales would go to charitable causes. Contributors could opt out of specific research or specify specific charities.
The result is a little like a non-profit data brokerage. It would put experts in charge of data protection and confidentiality, and it explicitly acknowledges that data has value. The broker would have legal recourse and financial means to track down data abuse.