BERLIN—Housing activists suffered a setback last month after Germany’s constitutional court overturned a five-year rent freeze that was introduced last year. For about 1.5 million affected households in the capital, the decision could mean drastic rent increases or even paying back the money saved while the freeze was in place. The big winner from the court’s decision was Deutsche Wohnen, a private housing company whose shares, traded on the Frankfurt stock exchange, saw a boost of nearly 3 percent after the decision was announced. The company’s shares had been trending downward since the rent freeze went into effect last November.