The two sentences are not identical, Vlad. The first means "I am not exactly sure when I will be home,but I am guessing that I will be home before midnight". THe second one means" It is necessary for me to be home before midnight", maybe the speaker will be in trouble if he is late.
"I should be home by midnight" can mean either of the two sentences you wrote. You can call someone and say "I should be home by midnight" if they ask you when you will home. This means #1.