The concept of a characteristic element is purely algebraic. Let $G$ be a finitely generated free abelian group and let $Q: G \times G \longrightarrow \Bbb Z$ be a symmetric bilinear form on $A$. Then $x \in G$ is a characteristic element of $G$ for $Q$ if $Q(x, \alpha) \equiv Q(\alpha, \alpha) \pmod 2 \text{ for all } \alpha \in G.$ So to define characteristic cohomology classes for a $4$-manifold with boundary, we just need to define the notion of an intersection form for a $4$-manifold with boundary.
If $X$ is a compact, oriented $4$-manifold with boundary $\partial X$, then it has an orientation class $[X, \partial X] \in H_4(X, \partial X; \Bbb Z)$. Then we define the intersection form $Q_X$ of $X$ by $Q_X: H^2(X, \partial X; \Bbb Z) \times H^2(X, \partial X; \Bbb Z),$ $(\alpha, \beta) \mapsto \langle \alpha \smile \beta, [X, \partial X] \rangle.$ Then a characteristic cohomology class of $X$ is a class $x \in H^2(X, \partial X; \Bbb Z)$ such that $Q_X(x, \alpha) \equiv Q_X(\alpha, \alpha) \pmod 2 \text{ for all } \alpha \in H^2(X, \partial X; \Bbb Z).$