Squaring Off (fit to smallest possible square)
MATL, 12 9 bytes

Saved three bytes thanks to Luis. he instead of UGwewe, but adding a t in the beginning. 

tnX^Xkthe


Try it online!

This returns the results, but transposed compared to the result in OPs post (which is OK). 

Explanation:

This works the same way for both numeric and string input, as MATL treats them the same way.

Assume the input is 'Dyalog APL'

                % Implicit: Take string or numeric array as input
                % Stack: 'Dyalog APL'
t               % Duplicate
                % Stack: 'Dyalog APL'
                %        'Dyalog APL'
 n              % Number of elements in last element. 
                % Stack: 'Dyalog APL'
                %        10
  X^            % Take the square root of the number of elements
                % Stack: 'Dyalog APL'
                % Stack: 3.16...
    Xk          % Ceil last number
                % Stack: 'Dyalog APL'
                %        4
      t         % Duplicate element
                % Stack: 'Dyalog APL'
                %        4
                %        4
       h        % Concatenate the last to elements horizontally
                % Stack: 'Dyalog APL'
                %        4  4
        e       % reshape into 4 rows, and 4 columns. Pads the input with zeros or spaces
                % if necessary.
                % Stack: (Note that there's a trailing column not shown below)
                %        DoP 
                %        ygL 
                %        a   
                %        lA  


This outputs nothing for empty input, which happens to be way MATL outputs empty matrices / strings.