Can "it" be used with plural subject?
Solution 1:
You have been taught correctly.
This is called the "existential it " or "dummy it ," it does not actually refer to the noun we see. It just stands for "the fact is that," or so.
As such, it does not need grammatical agreement (singular/ plural) with anything, it's always "it" as in "It is raining." or otherwise.
[EDIT]
Amended, thanks to Prof Lawler's answer.
This is a dummy it, but there is no "existential" it. … (T)his one is the it produced by the Cleft construction. … There is no plural for dummy it. In general, plural predicate nouns do not require plural subjects.
Solution 2:
This is a dummy it, but there is no "existential" it.
There's an existential there, which comes from There-Insertion.
There are several dummy it's, but this one is the it produced by the Cleft construction.
There is no plural for dummy it. It's it, and that's it.
In general, plural predicate nouns do not require plural subjects.
It's plural verbs that require plural subjects.
Plural verbs are not plural nouns.
And vice versa.
Solution 3:
It's fine to use "it" as a dummy subject to represent an an infinitive (like I just did), a plural subject (per your question) or a subject with gender (see below.) In fact it's the best way to form certain sentences. I've taken the examples from your question and added a few, to show how they flow when we avoid the dummy subject.
1
How hard living alone is, is hard to imagine.
How hard it is to live alone is hard to imagine.
It is hard to imagine how hard it is to live alone.
2
The thing that matters here is not my university degree.
It is not my university degree that matters here.
3 (translation of something I saw in Cartagena, Spain recently.) "It was me/you/him/her/them" is another typical example.
The person who built the city walls was King Carlos III.
It was King Carlos III who built the city walls.
4
Social themes are the only thing that matters.
It is only social themes that matter.
What is interesting is that in example 4, when I avoid the dummy subject, the noun I have to insert is "the thing", which is a singular noun to identify something plural (social themes.)
Therefore the verb "is/are" in the first sentence is plural (to match the subject: social themes) and in the second sentence is singular (to match the dummy subject: it/the thing.) And the verb "matter" changes conversely.