From what I understand from Serebii and from years of grinding, there are a lot of things going into this. It’s not very simple.
Lucky Egg increases the experience you gain in battle by 50%.
Exp. Share gives you 50% of all experience points earned (and then more if that pokémon participated in the battle with the fainting opponent pokémon.)
Let’s break that down practically.
You probably have 6 pokémon in your party. Let’s say they all fight equally and get an even amount of Exp. Points (they probably don’t, but I don’t have a lot of information to go on here.)
The pokémon with the Exp. Share would get a little more than half of all Exp. Points, because that’s what the Exp. Share does, at least. You’ll get a little more than that, because that pokémon will be fighting and getting parts of that other half at times, if not all of the other half. Either a total of all of the points (if it fights all of the battle), 3/4 (if it is fighting with one other pokémon on that battle,) about 2/3 (if fighting with two other pokémon), and so forth.
Either way, that’s more than half or 1/2+
The one with the Lucky Egg will get a sixth of all of the Exp. Points earned by your team. With the item, they’ll 50% more than everyone else, so that would be a twelfth more than everyone else (or half of the share that everyone would be getting in the first place.)
1/6+1/12=3/12 or 1/4 of all Exp. points.
There are quite a few assumptions that I made here (e.g. None of the pokémon have fainted, they all fight the same amount, they all get the same amount of Exp. Points, none of the other Pokémon are holding items that affect Exp. Points, the kinds of Pokémon you fight with each pokémon.)
But, all things held equal, the Exp. Share will consistently get you Exp. Points even when you don’t battle, where the Lucky Egg gets you Exp. Points only when the pokémon holding it battles.
So if you’re fighting equally amongst your team, then Exp. Share is the way to go.
If you’re focusing on just one pokémon, then use the Lucky Egg. Exp. Share does not increase the amount of experience you get (it also doesn’t affect your Effort Points for fighting certain pokémon, if you’re into EV training. Exp. Share gives you EVs that you may not want for your pokémon.)
Now if you want to give one item to one and then the other item to the other, then keep reading.
How much experience does it take for your pokémon to level up? Some pokémon (e.g. dragon, pseudodragons, pseudolegendaries, rare pokémon) level up much more slowly than others (e.g. Pidgey/Pidgeotto). If the pokémon at level 25, doesn’t need as much experience to level up as does the one at level 34, then, all other things held equal, those pokémon might get to their evolution levels at about the same time. In fact, I’ve found that pokémon who evolve at significantly higher levels tend to need more experience per level than other pokémon who evolve at lower levels.
So I’d bet that your fully evolved pokémon at level 43 would be much stronger than the one that evolves at level 37 in terms of individual values (i.e. the stuff that makes some pokemon generally stronger than others no matter how you train them. For example, Arceus has the highest amount of total IVs. Legendaries and dragons tend to have high total IVs.)
Also also, note that one pokémon has 9 levels to go, and the other has 12 levels. Again, all other things held equal, the one at level 34 may evolve more quickly, simply because it’s closer. But as you get higher in level, the amount of experience points you need to level up increases regardless of what kind of pokémon species you’re dealing with.
So having said that (now naming you pokes by the level they’re at now):
tl;dr in bold
I would probably give the Exp. Share to the one at level 25, and the Lucky Egg to the one at 37.
The one at 37 is more likely to fight in your more important battles, because it’s stronger and could do better. It can take advantage of the boosted Exp. Points of Lucky Egg, because it will be doing a bit more battling. The one that’s just at Level 25 is more likely to get knocked around in more important battles, but it would still get half of the experience from those battles without having to fight.
Now, if you’re just walking around and training everyone equally and you’re not at a important part of the game, then give the Lucky Egg to the one at 25, and then give the Lucky Egg to the one at 37 before you go into a battle with it.
You’re probably not going to let your level 25 fight strong wild pokemon or very strong trainers by itself, but it could probably take weaker wild pokémon or weaker trainers. In that case, before you go into a battle, just give the Lucky Egg to whichever pokémon is going to do the heavy lifting in that battle.
Super tl;dr: EXP SHARE GETS YOU MAX EXPERIENCE OVERALL.