If the majority voted Leave, shouldn't the Remainers also have a say in whether it is hard or soft?Use conditional answers.
Do you want to leave- yes or no- if you answered yes, do you want option 1 (soft) or option 2 (hard)?
Granted it means that leavers have to answer one more question than remainers but I don't see that as being a major hardship.
I cannot see any other way of ceding to the "will" of the people unless you ask them what they really want.
If the majority answer yes, you then take into account their second response. That said, if in the event of the majority votes being to leave and a majority of leavers voting for a soft brexit, the likes of Farage will probably still claim that the democratic will of the people has been ignored.
Then it would be a simple 'first preference' and 'second preference' for all voters, like the NI transferable vote system.