Based on first-principles simulations and calculations, we explore the evolutions of crystal structure, electronic structure and transport properties of quasi 2D layered PdS2 under compression by uniaxial stress and hydrostatic pressure. An interesting ferroelastic phase transition with lattice reorientation is revealed under uniaxial compressive stress, which originates from the bond reconstructions of the unusual PdS4 square-planar coordination. By contrast, the layered structure transforms to a 3D cubic pyrite-type structure under hydrostatic pressure. In contrary to the experimental proposed coexistence of layered PdS2-type structure with cubic pyrite-type structure at intermediate pressure range, we predict that the compression-induced intermediate phase showing the same structure symmetry with the ambient phase, except of sharply shrinking interlayer-distances. The coordination of the Pd ions not only plays crucial roles in the structural transition, but also lead to electronic structure and transport properties variations, which changes from square-planar to distorted octahedron in the intermediate phase, resulting in bandwidth broaden and orbital-selective metallization. In addition, the superconductivity in the cubic pyrite-type structure comes from the strong electron-phonon coupling in presence of topological nodal-line states. The strong interplay between structural transition, metallization and superconductivity in PdS2 provide a good platform to study the fundamental physics of the interactions between crystal structure and transport behavior, and the competition or cooperation between diverse phases.