1A: How's your middle school, Jimin?

2B: It's good. Everyone is friendly.
3A: Is it different from elementary school?
4B: Yes, we have a big library. The school lunch is great, too.
-------------------------------------------------------------------------------
Q1: Does 'It' in 2B refer to 'your middle school'? Does 'it' in 3A refer to the same?
Q2: Why is 'The school lunch' used in 4B? Can't we use 'School lunch' here?
What is the difference between 'The school lunch' and 'School lunch'?

3 answers

Q1 -- Yes, in both sentences.
Q2 -- The word "The" in 4B is just a natural phrasing. If you omit it, the sentence would sound strange. You could also say "The school lunches..." since there's a different lunch served each day.
Thank you for your help.

5. The school lunch is great.
6. The school lunch at the school cafeteria is great.
[Is the school lunch is the specific lunch at the school cafeteria? Does #5 mean #6?]

7. School lunch is great.
[Is 'School lunch' in generic use? General school lunch in any school?]
I wouldn't omit "the" when referring to school lunches. If I were to refer to a particular lunch served one day, I'd say, "The spaghetti lunch at school today was awful!" (or some variation!).