For this type of strategy game a part of the fun is balancing combat strength and power against cost. Your list includes some of that, but it doesn't seem well defined.
You mention "tech", you mention units having costs, you mentions melee and range. Those are part of the balance.
It is generally good to have a mix of strengths and weaknesses, with the relative values depending on the cost of the unit. This gives the player the ability to create strategy. A good strategy game allows a skilled player to come up and win under difficult positions if they can exploit strategic weaknesses.
You've started with five types, but you've not really figured out strengths and weaknesses. You'll want to start figuring them out with something like this:
Peasants: Strength - cheap, quick to train, probably can build things. Weakness - very low defense stats, low offense stats.
Spearmen: Strength - Spears are extremely strong against cavalry, pikes in the ground slow incoming opponents. Weaknesses - Low defense stats.
Swordsmen: Strength - High defense stats, high melee damage stats. Weakness - High cost, slower due to armor, requires technology.
Archer: Strength - Ranged damage. Potentially agile/fast unit. Weakness - very low defense, possibly as low as peasants. Requires technology.
Catapults: Strengths - Very high ranged damage, possibly splash damage. Weakness - Extremely slow to move, slow to fire and reload, extremely low defense against melee, cost.
When you've figured out all the strengths and weaknesses, you've got to figure out approximate power and cost ratios. How many of X should be able to defeat a Y? Generally if two have equal cost the strategic value should be equal. That is, of a light infantry costs the same as a basic archer, then if you put an archer versus an infantry the archer has a chance to kill the infantry as they approach, but if they reach it the infantry can quickly overcome the archer, making it about a 50/50 since they cost the same. Paying a higher cost like an archer digging in or embedding in a tower makes the archer more powerful, paying a higher cost like better shields reduce the risk to the infantry from inbound arrows.
Every character type should have some weakness that can be exploited.
In real life navies, consider how aircraft carrier groups are configured. There is generally an aircraft carrier that is quite weak and slow and serves as a hub but has very low offensive or defense capabilities in itself; several airplane wings that are maneuverable and can do a wide range of damage but have limited range and few individual weapons; 1-4 cruisers with guided missiles that can handle large distant surface targets; 1-6 destroyers with anti-submarine and anti-aircraft capability, 1-4 submarines to counter other submarines and other ships, and can sacrifice secrecy to launch missiles; fuel and supply ships and other vessels for logistics and maintenance and mission needs.
Note how each ship has weaknesses and strengths. On their own each ship can be overcome by others. Subs are easily destroyed by destroyers and by air-dropped armaments. Cruisers are vulnerable at close range. Destroyers are vulnerable at long range. Aircraft are weak and easily overcome by nearly anything, but extremely mobile and versatile. When they are working as a group they are strategically solid.
Similarly in the Star Wars universe, a Death Star can destroy entire planets, has high power long-range defenses, and carry over a million military personnel, but could be overcome by weak points from small ships. Their fleets generally include a collection of craft each with a different mix of offensive and defensive capabilities.
You also asked about making it interesting. That's harder.
You need an incentive to get players moving as quickly as possible. The opening moves are critical, and a player who stalls up front will have more difficulty later.
You've got to have increasing entropy. In some other games the contest is about balance and reducing entropy, encouraging the loser to come from behind, such as cart racing games giving high-power bonuses to last-place players and weak rewards to those in first place. In RTS games the goal is increasing entropy. You want the end to be explosive, even when one side is completely overpowered. That generally means the end game is decided by enormously powerful battle fleets in games like Starcraft, or by fully-leveled characters in LoL that can do enormous damage with every hit.
And you've got to have a chance for players to win from behind. This generally means the win condition (or loss condition) is not defined by the accumulation of power. Consider sometimes in League of Legends where a team can strategically distract their opponents into major battles and conflict, and even though they are weak they win the objective by opening a hole for their minions. The "winion" strategy works amazingly well if you can distract the opponent.
If you can see other strategic openings depending on the game it can be enough. In the old Command and Conquer games, if you knew where the target was you could focus on building a huge fleet of aircraft. All the defenses would be fired at the first few airplanes, so a set of 8+ aircraft flying directly to the construction target could destroy most players. A Zerg Rush feels like a dirty trick but wins the game. And of course, all it takes is one incredibly lucky X-Wing to take down a Death Star. The trick in strategy is to find and exploit strategic weaknesses, while building up your own layers of strategic defense.