No, it isn't entirely correct grammatically. Let's simplify for a minute, by putting the subordinate clause last:
It seems that the earnings of the low-paid classes will diminish, what with/on account of an increased rate of inflation and the public aid having been eliminated.
First, you have to say the public aid having been eliminated rather than having been eliminated the public aid. Consider this:
The public aid has been eliminated.
We have eliminated the public aid.
You'll note that the word order for passive voice is the reverse of that for active voice.
Next, on account of/what with refers to both the public aid and the inflation, so you need to reflect that by putting it before both ideas.
Now, you can put the subordinate clause first for emphasis, as you have:
What with/on account of the public aid having been eliminated and an increased rate of inflation, it seems that the earnings of the low-paid class will diminish.
Now, which to use, on account of or what with? I lean towards what with, because it has more of a flavor of speculation. When you say "it seems that" that also suggests speculation, so I find it a bit more in keeping with the overall speculative idea of the sentence. Either is entirely correct, though.
Taking your last example first: do you understand the gerund phrase? This is a phrase that begins with a gerund, where the -ing form of the verb acts like a noun.
I enjoy (sitting on my roof)
I remember (seeing the Beatles in concert)
In the same way "knowing ..." is a gerund phrase that is the object of "do you remember (X)?"
Do you remember (knowing how to play the guitar)?
Take this and change it to the present perfect, which indicates a life experience:
(I have known how to play the guitar.) Do you remember having known how to play the guitar?
(I have worked with Java) Do you recall having worked with Java?
In a similar way, the "to be" verb "is" can be used as a gerund:
(It is open) I remember it being open.
(It is defined in the manual) It is no less confusing, even after being defined in the manual.
This syntax is convoluted and I personally don't recommend using it, if possible. Most of these examples are better when written with simpler grammar:
There is a difference between the practical knowledge you get from working in Java, and the knowledge required to pass this test.
Have you known more than one Amit ... in your life?
Best Answer
Although I know that I can't elaborate the issues well, I would like to point out a few important grammar terms related to the constructions (A) and (B) in the OP's question. Most of the following is extracted from Practical English Usage by Michael Swan. Some is extracted from Wikipedia pages. Mistakes are mine.
Present Perfect: We use present perfect to say that a finished action or event is connected with the present in some way. If we say that something has happened, we are thinking about the past and the present at the same time. (For example, I have known her for years. You have done a lot for me.)
Passive Voice (also known as "Passives"): In a clause with passive voice, the subject denotes the recipient of the action rather than the performer. (They built this house, is in active voice. The house was built, is in passive voice.) Passive tenses are normally used in the same way as active tenses. For example, the present progressive passive is used, like the present progressive active, to talk about things that are going on at the time of speaking. (For example, The papers are being prepared now.)
Gerunds: When -ing forms are used like nouns, they are often called "gerunds". (For example, Smoking is bad for you. I hate packing suitcases.) It can sometimes be difficult to decide which term to use (between "gerunds" and "present participles"). Some grammar books might refer to verbs with -ing as "-ing forms".
Both OP's sentences (A) and (B) are in the past tense. They both have the same main verb, liked.
Consider sentence (A),
The part "being looked" is a gerund, as godel9 explained.
Now, consider sentence (B),
The part "having been looked" in sentence (B) is also a gerund. It is also in a perfect tense, and in passive voice. Although this construction is possible, it's rare. The COCA corpus returned no result at all for other verbs in the place of liked, except for reported. For example,