"I'm playing a game as Pericles - I'm by far the largest (though Portugal has a vassal and is considered a bit larger than me without one)"
What is this supposed to mean? Seems Portugal is the largest to me, and that's the lesser of the advantages he has over you.
"I might focus on building a ton of longbows and upping research Gold for a while, now that I am in a position where I can focus on peace."
If you focus on longbows, upping research, upping gold and peace,
you're not really focused.
If you're at peace you don't need longbows. Don't waste time and money on them. Given your tech situations, any war would presently kill you, so your best hope is to
avoid war by any diplomatic means. Only if and when Portugal does declare on you should you whip longbows and brace yourself. Likewise, you're currently building a catapult, three phalanxes and a horse archer and a war elephant. It does not make sense in peace time. Likewise, walls by themselves don't make sense (although preemptive walls are better than units in that you don't have to pay for them to do nothing).
It seems that you're bleeding money. New settlers is blood-letting to cure an hemorrhage.
Libraries won't help either. I guess you want scientists to keep research going at 0%, but 4 scientists won't do much. Researching Drama is nonsensical, since the research hasn't started, I'll hope it's a placeholder. But
you probably should push the slider all the way down to 0% so it doesn't matter.
I think
from your position (far behind with a decent but not outstanding number of cities),
your best hope is espionage economy.
Whip courthouses everywhere, it should prevent the bankrupt you're currently running into and give you those nice espionnage points. If you got stone,
build castles (it seems you got engineering already), it should make yourself feel safer reguarding DoW risks, and more importantly gives a nice eco bonus for an espionnage eco. Once your eco starts recovering,
push the espionnage slider up and spend those point on whoever you want to steal from (waiting 5 turns, preferably in nearby small foreign cities of your religion).
It goes without saying that to whip courthouse, you should focus on food, build granaries everywhere and use any whip overflows or chop to bring courthouse whip down to 3 pop whip.
Developp your citiy buildings with that order of priority :

->

/

->

->

->

->
Whipping a forge before a courthouse can make sense if you want a forge at all in a city because it is productive. In small or unproductive cities with low hammer, courthouse before forge, if at all.
Also, in all but your best cities, you should stop developpement at courthouse/castle and build wealth. Only for happiness and health concern should you build grocer and market.
Do not resume science until you can research an exclusive tech.
It does include building libraries
The reason is if you're behind, it cost typically twice less

to acquire a tech through

than through

, sometimes even less. The downside is that you're limited to tech someone already has, but that does not seem be a limitation for you here. What's more,

is easier to ramp up than

with a lot of crap cities (whereas if you wanted to play the

game, you should not have overexpanded that much and Athens and Argos should have had their libraries at least two milennias ago).
Your first exclusive tech should probably be spy related like communism or democratie. This is because espionnage is fairly limited with only courthouses and castles. Democratie, you can probably wait and steal it. Communism, I wouldn't count on AI to be particularly fast at getting it.
Also, postpone stealing economics (they obselete castle).
So that is how to come back in the game.
After that, play the game normal make an industrial boom (factories about every where, rely on FEUSS cottage or on state property. You're philosophical but it seems really late for a specialist eco to be worth anything).
About win condition, I wouldn't say you're in a position to win right now. If you recover, you could aim at any condition really, I don't see any easy one, but some are definitely harder.
- You're probably not large enough to win diplomatically all by yourself
- cultural, I don't know, you got 5 religion in your empires and more than 12 cities, it's probably doable with a lot of technique and focus.
- space race. Depend on your resources, require some technique and focus. I don't know how good AIs are at it, but mansa looks like a good contender to beat you.
- Domination and conquest, at the very least tedious, but probably out of reach given how strong Portugal looks.
So I vote space. A good espionnage eco is also very helpful in space race, you can see how far your opponents are and sabotage them. As long as they don't anihilate you in the near future, good things the strongest civs are next to you I guess.