First, I am not a lawyer, much less a Constitutional one.
That being said, there’s a very good argument it qualifies as a “taking” for Constitutional purposes, “without due process of law.” For landlords, there is no appeal and no distinction made on whether the tenant has actual financial difficulties. In theory this might be mitigated by the pandemic - but after a year-and-a-half, it’s difficult to treat this as a temporary, emergency measure. In addition, it’s extremely suspect Constitutionally that an executive-branch department could even lawfully issue the order in the first place. (I’ll come back to this point.)
The trick is whether or not the government took anything in the process. In this case, the government can argue that the government didn’t personally gain by doing so, instead the benefit went to others. And second, the money is still, in theory, owed to the landlords so there is no problem. I would find both of these arguments flawed. I believe the first is definitely invalid; the Constitution resists the use or abuse of government power and that is not changed by the question of who would benefit from its, just as it cannot bargain away Constitutional rights in a treaty. That said, not being a Constitutional lawyer I have no idea if that’s ever been litigated.
For the second point, it’s not guaranteed that a court would side with landlords but, “if regulation goes too far it will be recognized as a taking.” [See
Regulatory Takings | U.S. Constitution Annotated | US Law | LII / Legal Information Institute ] In this instance, there are several ways the government could have mitigated the property loss but it has not yet chosen to do so. However, the issue may functionally turn on whether or not the landlords are experience a “taking” based on whether the tenant just doesn’t pay. This is a very tricky question because theory and practice may be miles away on this point. In theory the landlord may have a collectible debt. In practice, there’s good odds they cannot actually collect. And I have no idea how the courts would ever deal with the potential flood of lawsuits. [Edit: I also have no idea what kind of precedent courts would pick to deal with the issue. Common Good because pandemic? Physical invasion because it involves actual, physical property with people living in it? No clue.]
Another issue is whether the moratorium was lawful to the begin with. The Commerce clause may have been stretched beyond sane meaning by judicial practice, but it’s difficult to argue that even Congress can decide on regulations affecting rent payments between owners and tenants living in a single state. At that point you’re basically arguing that the Federal Government has unlimited authority; no commerce anywhere at any time could not also be so regulated. And for a department whose authority is over disease to do so as a blanket action is a deep problem, and not a precedent I would like to see extended. Presumably then any agency might start making its own pronouncements at will, so long as the executive feels like it.
I tried to leave most of the practical problems at the door in my response, but wow do those also exist.