Lots of questions
There is an 'effective needs happiness' and 'raw needs happiness' (I don't think those are the common terms), 'effective needs happiness' will not exceed city population if my overall empire happiness is good.
There's a worldwide base needs per citizen, and your city modifiers.
Building e.g. barracks in a new, 5 pop city with no terrain improvements will help nothing (distress wise) because of so much deficit in every yield (high 'raw needs happiness')
It removes 1 distress and adds a little bit of science and production which also helps with yields. More importantly, it gives production that you might use in building other buildings faster. So it's not that it is useless, it's more that you need barracks and many other things.
I can focus on improving avg. yields for one city, get it to very low unhappiness and then lock growth, put trade routes somewhere else - if I'm satisfied with this city not growing ever again.
Yes, you could. And in fact there is a playthrough in the strategy section that does exactly that. But the average player can do better letting the cities grow more. More people, more yields, more things done. Happiness is just a mechanic for slowing you down.
In wide play, weaker and late built cities will basically have their happiness = unhappiness (unless I put some extra effort)
Yes. But a wide player would not mind too much about these cities. They have a role, probably they are a base for your army, or they are a buffer for protecting your inner empire, or you purchase your missionaries there. Just assume they are going to be unhappy for a while. When your policies are high enough, even those cities can be an asset.
Difficulty level influences global avg. needs (AI building good economy faster) therefore making managing happiness more difficult
Yes.
if I let Ravenna grow, is it because other needs would be more serious?
Yes. It's not that they stopped caring about boredom, but they are more pressed by other things. There is precedence here. Distress > Poverty > Illiteracy > Boredom.
What needs should I address first if I were to start improving this particular city, how to read the data?
Production. You need your city to be able to build every useful building ASAP. Then food. You need more citizens working on high productive tiles if you want your city to build them fast. Sending internal trade routes may help. I am assuming that your money, culture and science are being mainly produced in your happy cities. After that, if you are just interested in happiness, look what your needs in the city are, and prioritize whatever gives yields or directly reduce unhappiness. For example, walls, they are quite good once your base yields are over 20, since they affect all needs. And the diplomatic buildings are amazing if you invest a little in befriending city states, plus the specialist is good.
About the engineer, do you think it makes sense to keep him active and add soon another one or two engineer specialists, so they would produce great person in some time? Or not worth it, without any fun bonuses to specialists?
Look at how long it takes for the next engineer in this particular city. Roughly 200 turns. You are not going to produce any. Even doubling the engineers is not going to make a difference. Work on your good sawmill tiles instead, you'll save 1 unhappiness from the specialist, get more spare food for growing your city and overall more yields.
The exception is guilds. You must never fall behind in policies.
Would you grow Ravenna to 12 pop and not develop any further till the end? What About all those plains southwest from the city, any use for them? I often don't need that many farm in medium quality city playing wide
My algorithm for any secondary city (no guilds) is letting it grow as long as there is some nice place to work on, discounting food, and I try to make my workers prepare the terrain in advance so there is always a nice place to work. A guild city is different in that I may work on good food tiles to be able to work more specialists.
Question about walls. They say they reduce the empire needs modifier by 5%. Is this the empire size modifier?
Yes, but it only modifies this value in the city with the walls.