Do the actions of one superhero affect those of the same superhero on another Earth? For example, does the action of Flash on Earth 2 influence the actions of the other Flash on Earth 1?
No, they do not have to react the same. Parallel Earth versions of characters have no requirement to be alike in any way. In fact, not every character will exist on every Earth. The DC Multiverse is predicated on the idea certain worlds share similar characteristics and possibly histories up to and including the presence of metahumans.
Each documented Earth exists as a parallel echo of the Prime Earth. As such, these separate worlds exist in completely separate Universes apart from each other, separated by a unique vibrational frequency. Travel between Universes is possible but VERY difficult without the proper advanced technology (or metahuman ability). This concept of parallel worlds in the DC Universe was revealed in the famed Flash of Two Worlds storyline in Flash #123 (1961)
While different worlds may have similar versions of particular people, each world is unique and the actions undertaken by any individual is their own having no influence on any other reality (beyond metaphysical ideas of quantum reality, which while pertinent, have no bearing upon this conversation).
While a dimensional traveler may draw conclusions on previous experiences, it might not be the best course of action since even parallel versions of famed metahumans may have very different backstories and responses depending on their world and upbringing.
In the DC Universe in particular, parallel Earths were initially DC's way of explaining their copyrights for characters which they had purchased over the decades.
On Earth-2 were all of the Golden Aged heroes who appeared from the beginning of the DC Universe in the late 1930s until the late 1950s to early 1960s. In this continuity, Superman, Batman, the Flash and Wonder Woman exist, but there are slight variations in their origins and secret identities. The most notable is the Flash whose identity as Jay Garrick varied widely from his later counterpart Barry Allen.
When DC decided to reboot their universe with more science-oriented heroes in the early 1960s, the Silver Age was born. These heroes would be placed on a different Earth, dubbed Earth-1. They would be younger versions of the Golden Aged heroes, often with significantly different costumes, far greater power levels and altered (more contemporary) origins.
DC would later go on to create other alternate Earths for their stories to appear on or in some cases to come from. The Shazam family stories hailed from Earth-S.
The Charlton heroes would hail from Earth-Four and rather than having Superman, they would have Captain Atom, the Question, Blue Beetle and Judomaster are famed heroes from that world.
The Pre-Crisis Earth-3 was a world where the analog for the Justice League (dubbed the Crime Syndicate) was completely evil and had taken the world hostage after destroying all of the other metahumans on their Earth. Only Alexander Luthor stood against them and complete world domination.
DC would also use parallel realities to house their Elseworld stories where tales of interesting divergent realities are told. Some of the most famous Elseworlds are Red Son where Kal-El lands in the Soviet Union and raised a soldier of the State, The Nail where Clark Kent is raised as an Amish farmer or Kingdom Come, where a world overrun with metahumans needs a guiding hand from a previous generation of heroes.
Each reality has different versions of famous heroes, others will have vastly different realities and some heroes may have never existed or have such divergent timelines as to be barely recognizable. See: OMAC and Kamandi.
Other References on Parallel Earths
No, because they are not really the same "character"; they are entirely different people, who happen to share names and identities.
The core principle of the DC (and Marvel) multiverses is that many (possibly infinitely many) distinct copies of the universe exist, where each single universe has its own timeline, its own history, its own inhabitants, etc. Those universes are formed and exist and age and die off entirely independently of any other universe.
In certain cases, various natural or man-made phenomena can allow certain beings from one of those universes to travel to another. Very powerful beings may even be "multiverse-aware", in the sense that they can exist across the whole spectrum of multiverses at once. In the DC world, for example, Barry Allen can sometimes use the Speed Force to hop between worlds. But this is a very deliberate act: a person leaves one universe and arrives at the other.
In many of these universes, there is a planet Earth that shares a significantly similar history (life evolving around the same time, humans evolving intelligence, technology progressing roughly the same, etc.). Often times, this leads to very similar superheros appearing in more than one universe. Sometimes these are the same people (e.g. Bruce Wayne becomes Batman on more than one Earth), and other times they are totally different people using the same identity (e.g. Jay Garrick and Barry Allen both call themselves The Flash on their respective Earths.)
In either case, though, these are entirely different individuals acting on their own. Nothing that happens to one of these people necessarily happens to the other; one Earth's Flash could die, or turn evil, or whatever, and the other Earth's Flash would keep being the same person he was before.