It certainly can be lawful. You, by all means, are allowed to buy either pair, the female or male one. If there is a rationale why they differ in prices (higher production, storage or shipping costs because of heavier, bulkier and more material-needing, pricier manufacture products) in reasonable proportion with the difference (not like male cost to sell £37, female £33, msrp £200, and msrp £100 respectively) would likely fail this test before a half decent tribunal. But if its an outgoing model, they try to swipe the stock, then clearly, the rationale is not related to sex or gender hence such discrimination could not reasonably be argued under any legal theory.
So, it would likely be generally lawful, and unlawful in the exception. Predominantly, businesses are in business to make business, and not to make political statements (unless that affects their business) otherwise they would go out of business. And this is a good general starting point to determine who has the onus.
To put a situation like this to a test, maybe garment is a better example where confection of substantially identical quality and substantially similar volume is used with other factors (production complexity, cost etc.) are similar, i.e. premium underwear and the prices between male and female counterparts are apart on multiple scales.
There, the decision to part prices based on gender, may flow more naturally from something inherent to the sex and gender of the two groups, but — then again — there may be substantially greater competitive pressure on some top brands of women’s lingerie then among male underwear brands which is a legitimate reason to lower their profit margin in the female lingerie and not the male counterparts to stay alive and turn a reasonable profit. But in that case, the price difference flows from market dynamics, and merely indirectly and not proximately or any fashion recognizable under the law as imposing liability for reasons of sexual discrimination.
On another note, while it’s completely possible that a misogynist (and perhaps also not completely impossible that a misandrist) or a group of them runs a shoe company for both sex to exert their sexist agenda, but this seems like a means that would both hurt them more, would probably not be recognized by the alluded target group as the expression of this group hate, but it is rather implausible and facially asinine. (You could lose or waste your money in more efficient ways to expose yourself to lawsuits that are easily understood as sexist declarations, no need to do it covertly hidden in price differences and relative profit margins) Anyone trying to sue on this basis would have an uphill battle to have a case that even reaches discovery to see any pattern to establish a believable motive of sexual discrimination.
Although secondary legislative material, but Citizens’ Advice requires, among others, that “the person [or entity] applying [a] policy, practice or rule [of indirect discrimination not be able to] show there’s a good enough reason for it”, and thereby engaging in discrimination of a protected group.
It’s questionable that discrimination exists at all where any sex is permitted to buy the male and female shoes, but if there was, there are plenty of “good enough reason” merely flowing from market dynamics substantiating “good enough reason” for, for the sake of the argument, “discrimination”.