On a degenerate elliptic problem arising in the least action principle for Rayleigh-Taylor subsolutions