I agree that the part about recharging is a bit ambiguous, because it's part of a two-sentence paragraph:
While the ward has 0 hit points, it can't absorb damage, but its magic remains.
Whenever you cast an abjuration spell of 1st level or higher, the ward regains
a number of hit points equal to twice the level of the spell.
If these were written in the other order, I don't think there'd be any potential for confusion, but this way, I can see someone reading the second sentence as conditional on the first. But, I don't think it's meant to be: if that were the case, the second sentence should be more clear about that.
So, I'd read it as your two spells (4th level and 5th level) recharging the ward to 18hp. And, this is also kind of sloppily worded, but presumably the ward's initial hit points are also the maximum — you can't "recharge" beyond that.
This reading is confirmed as the design intent in a tweet by co-designer Jeremy Crawford — thanks to wax_eagle for checking.
Note that the ward does not mention temporary hit points. It is a stand-alone rule, and it should be read just on what it says. Even if the ward acts similarly to having temporary HP in some ways, it doesn't say that they are, so they aren't — and can work differently in some of the details. (And, crucially, you might have both the ward and temporary hit points.)
For what it's worth, this does seem pretty awesome: a 10th level barbarian with a 20 con has 125 hit points. A level 10 abjurer with a 16 con has 72, and a 25 hp buffer — and if she uses all of her spell slots casting abjuration spells, that can recharge up to 82, for an effective total of 179. If one of those spells is Stoneskin, she has the same resistance to normal weapon damage as the ranging barbarian, although probably not as high an AC without making a lot of the castings Shield.
On the other hand, a 10th-level Moon Druid (say, around 83 hp) can shift into Ankylosaurus form twice between short rests, giving what's effectively two 68hp buffers and also you are a dinosaur. I expect once we get into Deep 5e Optimization Territory, there will be plenty of other things which outstrip the arcane ward.
The ward begins at maximum hit-points. The first version of the PHB stated the same passage as:
The ward has hit points equal to twice your wizard level +your Intelligence modifier.
I believe the change in text was made to address questions about the maximum, but in doing so I guess it introduced this question.
Best Answer
Yes, this would work
The Arcane Ward class feature of the Abjuration Wizard does not specify that the abjuration spell in question has to come from a Wizard spell, nor does it mention spell slots, simply the spell's level, so as long as it's not a cantrip, if you find a way to cast an abjuration spell of 1st level or higher at will (such as by casting mage armor via the Armor of Shadows Eldritch Invocation) then your plan will work. You would be able to repeatedly cast mage armor in this way to restore the ward's hit points to the maximum amount "for free".
From the PHB, page 115:
Without Multiclassing
As pointed out in a comment by @BlueMoon93:
So through the use of the Spell Mastery class feature of the Wizard, you can pick an Abjuration spell as your 1st level spell or your 2nd level spell and cast that at will to restore your Arcane Ward's hit point.
From the PHB, page 115: